Skip to content

Commit

Permalink
Merge pull request #28 from gdisdevops/feature/ECLOUD-3291-integrate-…
Browse files Browse the repository at this point in the history
…vault-crd-post-renderer

ECLOUD-3291 Adding Vault CRD post renderer initial release
  • Loading branch information
Lerentis authored Jan 30, 2023
2 parents 1ca42da + 64a885e commit d1ed3c5
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docker-publish-jnlp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ jobs:
id: build-and-push
uses: docker/[email protected]
with:
context: .
file: ${{ matrix.image }}/Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Jenkins JNLP images with additional tooling.

## Jenkins Inbound Agent

INBOUND_AGENT_VERSION=4.13.2-1
INBOUND_AGENT_VERSION=4.13.3-1
VAULT_VERSION=1.5.3
PACKER_VERSION=1.8.1
TERRAFORM_1_VERSION=1.0.5
Expand Down
23 changes: 18 additions & 5 deletions jenkins-inbound-agent/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM jenkins/inbound-agent:4.13.2-1
FROM jenkins/inbound-agent:4.13.3-1

USER root

Expand All @@ -18,6 +18,7 @@ ARG SONOBUOY_VERSION=0.56.6
ARG COSIGN_VERSION=1.10.1
ARG SENTRY_CLI_VERSION=2.5.0
ARG CHECKOV_VERSION=2.2.234
ARG VAULT_CRD_RENDERER_VERSION=1.0.2

RUN set -eux; \
apt-get update; \
Expand Down Expand Up @@ -58,6 +59,7 @@ RUN set -eux; \
COSIGN_DOWNLOAD_URL="https://github.com/sigstore/cosign/releases/download/v${COSIGN_VERSION}/cosign_${COSIGN_VERSION}_arm64.deb"; \
SENTRY_DOWNLOAD_URL="https://release-registry.services.sentry.io/apps/sentry-cli/${SENTRY_CLI_VERSION}?response=download&arch=aarch64&platform=Linux&package=sentry-cli"; \
SENTRY_HASHSUM="4d4bfdefc86738feec7e59ff5b0e7c824c37fa8c150e8926a020b0a1e4f84120"; \
VAULT_CRD_RENDERER_URL="https://github.com/DaspawnW/vault-crd-helm-renderer/releases/download/v${VAULT_CRD_RENDERER_VERSION}"; \
;; \
amd64|x86_64) \
AWS_CLI_DOWNLOAD_URL="https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip"; \
Expand All @@ -77,6 +79,7 @@ RUN set -eux; \
COSIGN_DOWNLOAD_URL="https://github.com/sigstore/cosign/releases/download/v${COSIGN_VERSION}/cosign_${COSIGN_VERSION}_amd64.deb"; \
SENTRY_DOWNLOAD_URL="https://release-registry.services.sentry.io/apps/sentry-cli/${SENTRY_CLI_VERSION}?response=download&arch=x86_64&platform=Linux&package=sentry-cli"; \
SENTRY_HASHSUM="f35d3cee001eb20b0706da9ddd939890371b0fd7b430a7ef3d3dfae8718b75a3"; \
VAULT_CRD_RENDERER_URL="https://github.com/DaspawnW/vault-crd-helm-renderer/releases/download/v${VAULT_CRD_RENDERER_VERSION}"; \
;; \
*) \
echo "Unsupported arch: ${ARCH}"; \
Expand Down Expand Up @@ -168,11 +171,21 @@ RUN set -eux; \
#### install cosign
curl -L "${COSIGN_DOWNLOAD_URL}" -o cosign.deb; \
dpkg -i cosign.deb; \
rm cosign.deb;
rm cosign.deb; \

RUN mkdir -p /etc/tfenv \
&& git clone --depth 1 https://github.com/tfutils/tfenv.git /etc/tfenv \
&& chown -R jenkins /etc/tfenv
#### install vault crd post renderer
curl -L "${VAULT_CRD_RENDERER_URL}/vault-crd-helm-renderer.jar" -o vault-crd-helm-renderer.jar; \
curl -L "${VAULT_CRD_RENDERER_URL}/vault-crd-helm-renderer.jar.sha1" -o vault-crd-helm-renderer.jar.sha1; \
sha1sum vault-crd-helm-renderer.jar; \
mkdir -p /opt/daspawnw; \
mv vault-crd-helm-renderer.jar /opt/daspawnw/vault-crd-helm-renderer.jar; \

#### install tfenv
mkdir -p /etc/tfenv; \
git clone --depth 1 https://github.com/tfutils/tfenv.git /etc/tfenv; \
chown -R jenkins /etc/tfenv;

COPY --chown=jenkins:jenkins jenkins-inbound-agent/bin/post-renderer.sh /usr/bin/post-renderer.sh

USER jenkins
#### install terraform with tfenv and helm diff
Expand Down
3 changes: 3 additions & 0 deletions jenkins-inbound-agent/bin/post-renderer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

java -jar /opt/daspawnw/vault-crd-helm-renderer.jar

0 comments on commit d1ed3c5

Please sign in to comment.