Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Feat: add tools required for infra-reports #66

Merged
merged 4 commits into from
Mar 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@ SHELL ["/bin/ash", "-eo", "pipefail", "-c"]

ENV HELM_HOME="/home/helm/.helm"

## Always use the latest Alpine packages
# hadolint ignore=DL3018
RUN apk add --no-cache \
ca-certificates \
curl \
bash \
git \
gnupg \
jq \
tar \
unzip \
wget
wget \
yq

ARG HELM_VERSION=3.6.3
RUN wget "https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz" --quiet --output-document=/tmp/helm.tgz \
Expand Down Expand Up @@ -67,6 +70,14 @@ RUN wget "https://github.com/digitalocean/doctl/releases/download/v${DOCTL_VERSI
&& chmod +x /usr/local/bin/doctl \
&& doctl version | grep -q "${DOCTL_VERSION}"

ARG RUBY_VERSION=3.0
## Always use the latest Gem and package versions
# hadolint ignore=DL3028,DL3018
RUN apk add --no-cache --virtual .build-deps build-base openssl-dev ruby-dev \
&& apk add --no-cache openssl ruby=~"${RUBY_VERSION}" \
&& gem install --no-document graphql-client httparty jwt time openssl base64 \
&& apk del --purge .build-deps

USER jenkins

ARG HELM_DIFF_VERSION=v3.4.2
Expand All @@ -81,7 +92,7 @@ RUN \
## As per https://docs.docker.com/engine/reference/builder/#scope, ARG need to be repeated for each scope
ARG JENKINS_AGENT_VERSION=4.11.2-4-alpine-jdk11

LABEL io.jenkins-infra.tools="helm,kubectl,helmfile,sops,aws-cli,aws-iam-authenticator,yamllint,updatecli,jenkins-agent,doctl"
LABEL io.jenkins-infra.tools="helm,kubectl,helmfile,sops,aws-cli,aws-iam-authenticator,yamllint,updatecli,jenkins-agent,doctl,jq,yq,ruby"
LABEL io.jenkins-infra.tools.helm.version="${HELM_VERSION}"
LABEL io.jenkins-infra.tools.helm.plugins="helm-diff,helm-git,helm-secrets"
LABEL io.jenkins-infra.tools.helm.plugins.helm-diff.version="${HELM_DIFF_VERSION}"
Expand All @@ -96,5 +107,6 @@ LABEL io.jenkins-infra.tools.updatecli.version="${UPDATECLI_VERSION}"
LABEL io.jenkins-infra.tools.aws-iam-authenticator.version="latest"
LABEL io.jenkins-infra.tools.jenkins-agent.version="${JENKINS_AGENT_VERSION}"
LABEL io.jenkins-infra.tools.doctl.version="${DOCTL_VERSION}"
LABEL io.jenkins-infra.tools.ruby.version="${RUBY_VERSION}"

ENTRYPOINT ["/usr/local/bin/jenkins-agent"]
6 changes: 5 additions & 1 deletion Jenkinsfile_k8s
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
parallelDockerUpdatecli([imageName: 'helmfile', rebuildImageOnPeriodicJob: false, containerMemory: '768Mi'])
buildDockerAndPublishImage('helmfile', [
automaticSemanticVersioning: true,
gitCredentials: 'github-app-infra',
useContainer: false,
])
4 changes: 3 additions & 1 deletion cst.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadataTest:
value: "/home/helm/.helm"
labels:
- key: io.jenkins-infra.tools
value: "helm,kubectl,helmfile,sops,aws-cli,aws-iam-authenticator,yamllint,updatecli,jenkins-agent,doctl"
value: "helm,kubectl,helmfile,sops,aws-cli,aws-iam-authenticator,yamllint,updatecli,jenkins-agent,doctl,jq,yq,ruby"
- key: io.jenkins-infra.tools.helm.version
value: "3.6.3"
- key: io.jenkins-infra.tools.helmfile.version
Expand All @@ -32,6 +32,8 @@ metadataTest:
value: "4.11.2-4-alpine-jdk11"
- key: "io.jenkins-infra.tools.doctl.version"
value: "1.70.0"
- key: "io.jenkins-infra.tools.ruby.version"
value: "3.0"
entrypoint: ["/usr/local/bin/jenkins-agent"]
cmd: []
workdir: "/home/jenkins"
Expand Down