From eddfb2b65b1ba291a005f717293d02e02acc3c6e Mon Sep 17 00:00:00 2001 From: Peter Kurfer Date: Tue, 10 Jan 2023 20:26:36 +0100 Subject: [PATCH] feat(ci): concourse pipeline --- .concourse/pipeline.yml | 24 ++++++++++++++++++++++++ .concourse/tasks/go-ci.yml | 25 +++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 .concourse/pipeline.yml create mode 100644 .concourse/tasks/go-ci.yml diff --git a/.concourse/pipeline.yml b/.concourse/pipeline.yml new file mode 100644 index 0000000..02236c5 --- /dev/null +++ b/.concourse/pipeline.yml @@ -0,0 +1,24 @@ +--- +resources: + - name: weekly + type: time + source: + interval: 168h + - name: ci-images.git + type: git + icon: github + source: + uri: https://code.icb4dc0.de/inetmock/ci-images.git + +jobs: + - name: go-ci + plan: + - in_parallel: + - get: weekly + trigger: true + - get: ci-images.git + trigger: true + - task: go-ci-image + file: ci-images.git/.concourse/tasks/go-ci.yml + input_mapping: + repo: ci-images.git \ No newline at end of file diff --git a/.concourse/tasks/go-ci.yml b/.concourse/tasks/go-ci.yml new file mode 100644 index 0000000..729a081 --- /dev/null +++ b/.concourse/tasks/go-ci.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/inetmock/ci-images/go-ci:latest --context go-ci/