This repository has been archived by the owner on Dec 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Caleb Hailey
committed
Mar 15, 2019
0 parents
commit 680c1d3
Showing
3 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM debian:stretch as builder | ||
ARG JQ_VERSION=1.6 | ||
ARG JQ_PLATFORM=linux | ||
ARG JQ_ARCH=64 | ||
WORKDIR /build | ||
RUN \ | ||
apt-get update && \ | ||
apt-get install -y curl && \ | ||
mkdir -p asset/bin asset/lib asset/include | ||
RUN \ | ||
curl -LO https://github.com/stedolan/jq/releases/download/jq-${JQ_VERSION}/jq-${JQ_PLATFORM}${JQ_ARCH} && \ | ||
chmod +x jq-${JQ_PLATFORM}${JQ_ARCH} && \ | ||
mv /build/jq-${JQ_PLATFORM}${JQ_ARCH} asset/bin/jq && \ | ||
curl -L https://raw.githubusercontent.com/stedolan/jq/master/COPYING -o asset/include/COPYING && \ | ||
cd asset && tar -czf sensu-assets-jq_${JQ_VERSION}_${JQ_PLATFORM}_${JQ_ARCH}.tar.gz * | ||
|
||
FROM scratch | ||
ARG JQ_VERSION=1.7.4 | ||
ARG JQ_PLATFORM=linux | ||
ARG JQ_ARCH=amd64 | ||
COPY --from=builder /build/asset/sensu-assets-jq_${JQ_VERSION}_${JQ_PLATFORM}_${JQ_ARCH}.tar.gz / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Sensu Assets JQ | ||
|
||
A Sensu Asset for installing the [`jq` CLI utility][jq-docs] as a Sensu | ||
monitoring check and/or mutator plugin. | ||
|
||
[jq-docs]: https://stedolan.github.io/jq/manual/v1.6/ | ||
|
||
## Usage instructions | ||
|
||
Coming soon. :) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export JQ_VERSION=1.6 | ||
export JQ_PLATFORM=linux | ||
export JQ_ARCH=amd64 | ||
docker build --build-arg "JQ_VERSION=${JQ_VERSION}" --build-arg "JQ_PLATFORM=${JQ_PLATFORM}" --build-arg "JQ_ARCH=${JQ_ARCH}" -t sensu-assets-jq:latest . | ||
docker cp $(docker create --rm sensu-assets-jq:latest true):/sensu-assets-jq_${JQ_VERSION}_${JQ_PLATFORM}_${JQ_ARCH}.tar.gz . |