From dfa54dda4ff49da8318d84d33450c39592d8791e Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Sun, 10 Mar 2019 15:35:08 -0700 Subject: [PATCH] Add a docker manifest --- .drone.yml | 29 +++++++++++++++++++++++++---- manifest.tmpl | 25 +++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 manifest.tmpl diff --git a/.drone.yml b/.drone.yml index a42150c..f5e62c7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,8 +1,8 @@ kind: pipeline -name: amd64 +name: linux-amd64 steps: - - name: Get qemu + - name: get qemu image: ubuntu:bionic commands: - apt-get update @@ -22,10 +22,10 @@ steps: --- kind: pipeline -name: arm +name: linux-arm steps: - - name: Get qemu + - name: get qemu image: ubuntu:bionic commands: - apt-get update @@ -45,3 +45,24 @@ steps: build_args: - ARCH=arm - REPO=arm32v6 + +--- +kind: pipeline +name: manifest + +depends_on: + - linux-amd64 + - linux-arm + +steps: + - name: publish manifest + image: plugins/manifest + settings: + spec: manifest.tmpl + auto_tag: true + ignore_missing: true + username: + from_secret: docker_username + password: + from_secret: docker_password + diff --git a/manifest.tmpl b/manifest.tmpl new file mode 100644 index 0000000..7f1ee85 --- /dev/null +++ b/manifest.tmpl @@ -0,0 +1,25 @@ +image: iamthefij/multiarch-pipeline-test:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}} +{{#if build.tags}} +tags: +{{#each build.tags}} + - {{this}} +{{/each}} +{{/if}} +manifests: + - + image: iamthefij/multiarch-pipeline-test:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64 + platform: + architecture: amd64 + os: linux + - + image: iamthefij/multiarch-pipeline-test:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64 + platform: + architecture: arm64 + os: linux + variant: v8 + - + image: iamthefij/multiarch-pipeline-test:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm + platform: + architecture: arm + os: linux + variant: v7