From 01096b421de39cc1b27f1e0196383279ac74a3bf Mon Sep 17 00:00:00 2001 From: Peter Kurfer Date: Tue, 3 Jan 2023 21:24:12 +0100 Subject: [PATCH] feat: add ko image --- .concourse/pipeline.yml | 24 ++++++++++++++++++++---- .concourse/tasks/ko.yml | 25 +++++++++++++++++++++++++ ko/Dockerfile | 4 ++++ 3 files changed, 49 insertions(+), 4 deletions(-) create mode 100644 .concourse/tasks/ko.yml create mode 100644 ko/Dockerfile diff --git a/.concourse/pipeline.yml b/.concourse/pipeline.yml index 5c4beef..96e0fb3 100644 --- a/.concourse/pipeline.yml +++ b/.concourse/pipeline.yml @@ -14,17 +14,33 @@ resources: repository: caddy access_token: ((github-credentials.token)) +- name: ko-release + type: github-release + icon: github + source: + owner: ko-build + repository: ko + access_token: ((github-credentials.token)) + jobs: - - name: images + - name: caddy plan: - get: ci-images.git trigger: true - get: caddy-release trigger: true - params: - globs: - - caddy_*_linux_amd64.tar.gz - task: caddy file: ci-images.git/.concourse/tasks/caddy.yml + input_mapping: + repo: ci-images.git + + - name: ko + plan: + - get: ci-images.git + trigger: true + - get: ko-release + trigger: true + - task: ko + file: ci-images.git/.concourse/tasks/ko.yml input_mapping: repo: ci-images.git \ No newline at end of file diff --git a/.concourse/tasks/ko.yml b/.concourse/tasks/ko.yml new file mode 100644 index 0000000..10cdcc5 --- /dev/null +++ b/.concourse/tasks/ko.yml @@ -0,0 +1,25 @@ +--- +platform: linux + +image_resource: + type: registry-image + source: + repository: gcr.io/kaniko-project/executor + tag: debug + +inputs: + - name: repo + path: . + +params: + GITEA_USER: ((gitea-credentials.user)) + GITEA_TOKEN: ((gitea-credentials.token)) + +run: + path: sh + args: + - -cex + - | + echo "{\"auths\": {\"https://code.icb4dc0.de\": {\"auth\" : \"$(printf '%s:%s' $GITEA_USER $GITEA_TOKEN | base64)\" }}}" > /kaniko/.docker/config.json + + /kaniko/executor --destination code.icb4dc0.de/prskr/ci-images/ko:latest --context ko/ diff --git a/ko/Dockerfile b/ko/Dockerfile new file mode 100644 index 0000000..28e4cd4 --- /dev/null +++ b/ko/Dockerfile @@ -0,0 +1,4 @@ +FROM docker.io/alpine:edge + +RUN echo https://dl-cdn.alpinelinux.org/alpine/edge/testing/ >> /etc/apk/repositories && \ + apk add -U --no-cache ko