This repository was archived by the owner on Nov 4, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +58
-0
lines changed Expand file tree Collapse file tree 2 files changed +58
-0
lines changed Original file line number Diff line number Diff line change @@ -331,6 +331,29 @@ kubetools-helm3:
331331 - buildah push --format=v2s2 "$REGISTRY_PATH/kubetools:$HELM_VERSION"
332332 - buildah logout "$REGISTRY_NAME"
333333
334+ kubetools-kubectl :
335+ << : *docker_build
336+ variables :
337+ << : *default-vars
338+ KUBE_VERSION : " 1.22.15"
339+ script :
340+ - buildah bud
341+ --format=docker
342+ --build-arg VCS_REF="$CI_COMMIT_SHA"
343+ --build-arg BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M:%SZ')"
344+ --build-arg REGISTRY_PATH="$REGISTRY_PATH"
345+ --build-arg KUBE_VERSION="$KUBE_VERSION"
346+ --tag "$REGISTRY_PATH/$IMAGE_NAME:kubectl"
347+ --tag "$REGISTRY_PATH/$IMAGE_NAME:kubectl-$KUBE_VERSION"
348+ --file "dockerfiles/$IMAGE_NAME/kubectl-1.22.Dockerfile" dockerfiles
349+ # Push to Dockerhub
350+ - echo "$Docker_Hub_Pass_Parity" |
351+ buildah login --username "$Docker_Hub_User_Parity" --password-stdin "$REGISTRY_NAME"
352+ - buildah info
353+ - buildah push --format=v2s2 "$REGISTRY_PATH/$IMAGE_NAME:kubectl"
354+ - buildah push --format=v2s2 "$REGISTRY_PATH/$IMAGE_NAME:kubectl-$KUBE_VERSION"
355+ - buildah logout "$REGISTRY_NAME"
356+
334357terraform :
335358 << : *docker_build
336359 variables :
Original file line number Diff line number Diff line change 1+ FROM docker.io/library/alpine:latest
2+
3+ ARG VCS_REF=master
4+ ARG BUILD_DATE=""
5+ ARG REGISTRY_PATH=docker.io/paritytech
6+ ARG KUBE_VERSION="1.22.15"
7+
8+ # metadata
9+ LABEL io.parity.image.authors=
"[email protected] " \
10+ io.parity.image.vendor="Parity Technologies" \
11+ io.parity.image.title="${REGISTRY_PATH}/kubetools" \
12+ io.parity.image.description="ca-certificates git jq make curl gettext kubectl;" \
13+ io.parity.image.source="https://github.com/paritytech/scripts/blob/${VCS_REF}/\
14+ dockerfiles/kubetools/Dockerfile" \
15+ io.parity.image.documentation="https://github.com/paritytech/scripts/blob/${VCS_REF}/\
16+ dockerfiles/kubetools/README.md" \
17+ io.parity.image.revision="${VCS_REF}" \
18+ io.parity.image.created="${BUILD_DATE}"
19+
20+ RUN apk add --no-cache \
21+ ca-certificates git jq make curl gettext bash shadow; \
22+ curl -L "https://dl.k8s.io/release/v${KUBE_VERSION}/bin/linux/amd64/kubectl" \
23+ -o /usr/local/bin/kubectl; \
24+ chmod +x /usr/local/bin/kubectl
25+
26+ RUN set -x \
27+ && groupadd -g 1000 nonroot \
28+ && useradd -u 1000 -g 1000 -s /bin/bash -m nonroot \
29+ && mkdir /config \
30+ && chown nonroot:nonroot /config
31+
32+ WORKDIR /config
33+
34+ USER nonroot:nonroot
35+ CMD ["/bin/bash" ]
You can’t perform that action at this time.
0 commit comments