From c79369a6255f7c23e4607b600f6642b885881c9e Mon Sep 17 00:00:00 2001 From: kolaente Date: Mon, 22 Jun 2020 18:57:20 +0200 Subject: [PATCH] Add docker multiarch manifest build step --- .drone.yml | 28 ++++++++++++++++++++++++++++ docker-manifest.tmpl | 18 ++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 docker-manifest.tmpl diff --git a/.drone.yml b/.drone.yml index 8ce048a2e..f4adde600 100644 --- a/.drone.yml +++ b/.drone.yml @@ -282,3 +282,31 @@ steps: auto_tag: true auto_tag_suffix: linux-amd64 depends_on: [ fetch-tags ] + +--- +kind: pipeline +type: docker +name: docker-manifest + +trigger: + ref: + - refs/heads/master + - "refs/tags/**" + +depends_on: + - docker-amd64-latest + - docker-arm-latest + +steps: + - name: manifest + pull: always + image: plugins/manifest + settings: + auto_tag: true + ignore_missing: true + spec: docker-manifest.tmpl + password: + from_secret: docker_password + username: + from_secret: docker_username + diff --git a/docker-manifest.tmpl b/docker-manifest.tmpl new file mode 100644 index 000000000..4d12a36a7 --- /dev/null +++ b/docker-manifest.tmpl @@ -0,0 +1,18 @@ +image: vikunja/frontend:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}} +{{#if build.tags}} +tags: +{{#each build.tags}} + - {{this}} +{{/each}} +{{/if}} +manifests: + - + image: vikunja/frontend:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64 + platform: + architecture: amd64 + os: linux + - + image: vikunja/frontend:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm + platform: + architecture: arm + os: linux