feat(kustomize): add image
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
0bd1b2b90c
commit
b934502cb3
2 changed files with 27 additions and 0 deletions
15
.drone.yml
15
.drone.yml
|
@ -20,6 +20,21 @@ steps:
|
|||
IMAGE_TAG: latest
|
||||
BUILD_CONTEXT: ko/
|
||||
|
||||
- name: kustomize
|
||||
image: gcr.io/kaniko-project/executor:debug
|
||||
network_mode: host
|
||||
commands:
|
||||
- >
|
||||
echo "{\"auths\": {\"https://code.icb4dc0.de\": {\"auth\" : \"$(printf '%s:%s' $$GITEA_USER $$GITEA_TOKEN | base64)\" }}}" > /kaniko/.docker/config.json
|
||||
- /kaniko/executor --destination "$${IMAGE_REPO}:$${IMAGE_TAG}" --context "$${BUILD_CONTEXT}"
|
||||
environment:
|
||||
GITEA_USER: prskr
|
||||
GITEA_TOKEN:
|
||||
from_secret: gitea_token
|
||||
IMAGE_REPO: code.icb4dc0.de/prskr/ci-images/kustomize
|
||||
IMAGE_TAG: latest
|
||||
BUILD_CONTEXT: kustomize/
|
||||
|
||||
- name: caddy
|
||||
image: gcr.io/kaniko-project/executor:debug
|
||||
network_mode: host
|
||||
|
|
12
kustomize/Dockerfile
Normal file
12
kustomize/Dockerfile
Normal file
|
@ -0,0 +1,12 @@
|
|||
FROM docker.io/alpine:latest as downloader
|
||||
|
||||
RUN apk add -U --no-cache curl jq && \
|
||||
export KUSTOMIZE_VERSION=$(curl https://api.github.com/repos/kubernetes-sigs/kustomize/releases | jq -r '[.[] | select(.tag_name | startswith("kustomize/"))] | first |.tag_name | capture("(?<version>[[:digit:]]+\\.[[:digit:]]+\\.[[:digit:]]+)") | .version') && \
|
||||
curl -L "https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v${KUSTOMIZE_VERSION}/kustomize_v${KUSTOMIZE_VERSION}_linux_amd64.tar.gz" | tar xvz -C /tmp && \
|
||||
curl -L -o /tmp/kubectl "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \
|
||||
chmod +x /tmp/kubectl
|
||||
|
||||
FROM docker.io/alpine:latest
|
||||
|
||||
COPY --from=downloader /tmp/kustomize /usr/local/bin/
|
||||
COPY --from=downloader /tmp/kubectl /usr/local/bin/
|
Loading…
Reference in a new issue