Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Caleb Hailey committed Mar 15, 2019
0 parents commit 680c1d3
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Dockerfile
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 /
10 changes: 10 additions & 0 deletions README.md
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. :)
5 changes: 5 additions & 0 deletions build.sh
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 .

0 comments on commit 680c1d3

Please sign in to comment.