Skip to content

Commit

Permalink
Add argocd-util, jq and promtool
Browse files Browse the repository at this point in the history
  • Loading branch information
maxbrunet committed Jul 12, 2021
1 parent 236d6cf commit aeaa388
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [v0.6.0] - 2021-07-12
### Added
- Add `argocd-util`
- Add `jq`
- Add `promtool`

## [v0.5.0] - 2021-07-02
### Changed
- Upgrade Helm to v3.5.1
Expand Down Expand Up @@ -48,7 +54,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Initial commit

[Unreleased]: https://github.com/PaytmLabs/docker-kubernetes-ci/compare/v0.5.0...HEAD
[Unreleased]: https://github.com/PaytmLabs/docker-kubernetes-ci/compare/v0.6.0...HEAD
[v0.6.0]: https://github.com/PaytmLabs/docker-kubernetes-ci/compare/v0.5.0...v0.6.0
[v0.5.0]: https://github.com/PaytmLabs/docker-kubernetes-ci/compare/v0.4.0...v0.5.0
[v0.4.0]: https://github.com/PaytmLabs/docker-kubernetes-ci/compare/v0.3.2...v0.4.0
[v0.3.2]: https://github.com/PaytmLabs/docker-kubernetes-ci/compare/v0.3.1...v0.3.2
Expand Down
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ RUN apk add --no-cache git \

FROM alpine:3

ARG ARGOCD_VERSION=2.0.4
ARG HELM2_VERSION=2.17.0
ARG HELM_VERSION=3.5.1
ARG JB_VERSION=0.4.0
ARG JSONNET_VERSION=0.17.0
ARG KUBEVAL_VERSION=0.16.1
ARG KUSTOMIZE_VERSION=3.9.4
ARG PROMETHEUS_VERSION=2.28.0

SHELL ["/bin/ash", "-euo", "pipefail", "-c"]

Expand All @@ -28,6 +30,9 @@ RUN apk add --no-cache --virtual .builddeps \
&& apk add --no-cache --virtual .rundeps \
bash \
git \
jq \
&& curl -sSfL "https://github.com/argoproj/argo-cd/releases/download/v${ARGOCD_VERSION}/argocd-util-linux-amd64" -o /usr/local/bin/argocd-util \
&& chmod +x /usr/local/bin/argocd-util \
&& curl -sSfL "https://github.com/google/go-jsonnet/releases/download/v${JSONNET_VERSION}/go-jsonnet_${JSONNET_VERSION}_Linux_x86_64.tar.gz" \
| tar -zxvf - -C /usr/local/bin jsonnet jsonnetfmt \
&& curl -sSfL "https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz" \
Expand All @@ -40,6 +45,8 @@ RUN apk add --no-cache --virtual .builddeps \
&& chmod +x /usr/local/bin/jb \
&& curl -sSfL "https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv${KUSTOMIZE_VERSION}/kustomize_v${KUSTOMIZE_VERSION}_linux_amd64.tar.gz" \
| tar -zxvf - -C /usr/local/bin kustomize \
&& curl -sSfL "https://github.com/prometheus/prometheus/releases/download/v${PROMETHEUS_VERSION}/prometheus-${PROMETHEUS_VERSION}.linux-amd64.tar.gz" \
| tar -zxvf - -C /usr/local/bin --strip-component=1 "prometheus-${PROMETHEUS_VERSION}.linux-amd64/promtool" \
&& apk del .builddeps

COPY --from=go-builder /go/bin/jsonnet-lint /usr/local/bin/
14 changes: 14 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
#!/usr/bin/env bash
set -euo pipefail

readonly ARGOCD_VERSION=2.0.4
readonly HELM2_VERSION=2.17.0
readonly HELM_VERSION=3.5.1
readonly JB_VERSION=0.4.0
readonly JSONNET_VERSION=0.17.0
readonly KUSTOMIZE_VERSION=3.9.4
readonly KUBEVAL_VERSION=0.16.1
readonly PROMETHEUS_VERSION=2.28.0

printf ">>> Checking git is installed...\n"
if ! git --help >/dev/null; then
echo ">>> git not installed properly."
exit 1
fi

printf ">>> Checking jq is installed...\n"
if ! jq --help >/dev/null; then
echo ">>> jq not installed properly."
exit 1
fi

printf ">>> Checking argocd-util version is %s...\n" "${ARGOCD_VERSION}"
[[ "$(argocd-util version --short)" == "argocd-util: v${ARGOCD_VERSION}+"* ]]

printf ">>> Checking helm version is %s...\n" "${HELM_VERSION}"
[[ "$(helm version --template '{{.Version}}')" == "v${HELM_VERSION}" ]]

Expand All @@ -37,3 +48,6 @@ printf ">>> Checking kustomize version is %s...\n" "${KUSTOMIZE_VERSION}"

printf ">>> Checking kubeval version is %s...\n" "${KUBEVAL_VERSION}"
[[ "$(kubeval --version | head -1)" == "Version: ${KUBEVAL_VERSION}" ]]

printf ">>> Checking promtool version is %s...\n" "${PROMETHEUS_VERSION}"
[[ "$(promtool --version | head -1)" == "promtool, version ${PROMETHEUS_VERSION} (branch:"* ]]

0 comments on commit aeaa388

Please sign in to comment.