From 30f0005a2b5a5fb14d1cc9d80a62fcbc108f2e08 Mon Sep 17 00:00:00 2001 From: redxef Date: Wed, 9 Mar 2022 16:49:43 +0100 Subject: [PATCH] CI for multiarch. --- .dockerignore | 2 - .gitignore | 3 +- ci/pipeline.yml | 113 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 114 insertions(+), 4 deletions(-) create mode 100644 ci/pipeline.yml diff --git a/.dockerignore b/.dockerignore index c15de06..55276ee 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,3 @@ .gitignore example/ -arch.txt -buildx.sh readme.md diff --git a/.gitignore b/.gitignore index bc05ca2..8b13789 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -arch.txt -buildx.sh + diff --git a/ci/pipeline.yml b/ci/pipeline.yml new file mode 100644 index 0000000..576dd17 --- /dev/null +++ b/ci/pipeline.yml @@ -0,0 +1,113 @@ +# --- +# resources: +# - name: every-week +# type: time +# icon: clock-outline +# source: +# interval: 168h +# - name: source +# type: git +# source: +# uri: https://gitea.redxef.at/redxef/nginx-envsubst +# branch: master +# - name: image +# type: registry-image +# source: +# username: ((docker.username)) +# password: ((docker.password)) +# repository: redxef/nginx-envsubst +# tag: latest + + +# jobs: +# - name: build-push +# plan: +# - get: every-week +# trigger: true +# - get: source +# trigger: true +# - task: build +# privileged: true +# config: +# platform: linux +# image_resource: +# type: registry-image +# source: +# repository: concourse/oci-build-task +# inputs: +# - name: source +# path: . +# params: +# IMAGE_PLATFORM: linux/amd64 +# outputs: +# - name: image +# run: +# path: build +# - put: image +# params: +# image: image/image.tar + + +--- +resources: +- name: source + type: git + source: + uri: https://gitea.redxef.at/redxef/nginx-envsubst + branch: master +- name: upstream-image + type: registry-image + source: + repository: alpine + +jobs: +- name: build-push + plan: + - get: source + trigger: true + - get: upstream-image + trigger: true + - task: compute-docker-tags + config: + platform: linux + image_resource: + type: registry-image + source: + repository: alpine/git + inputs: + - name: source + path: . + outputs: + - name: docker-tags + run: + path: sh + args: + - -c + - | + #!/usr/bin/env sh + git rev-parse --short HEAD > docker-tags/tags.txt + - task: build + privileged: true + config: + platform: linux + image_resource: + type: registry-image + source: + repository: redxef/concourse-buildkit + inputs: + - name: source + path: . + - name: docker-tags + params: + username: ((docker.username)) + password: ((docker.password)) + repository: docker.io/redxef/nginx-envsubst + tag: latest + additional_tags: docker-tags/tags.txt + push: true + platform: aarch64,arm,i386,ppc64le,s390x,x86_64 + context: . + manual: false + run: + path: build +