From c3640b0765c87752c61000d2bfcbdcbaf8ed162c Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sun, 17 Feb 2019 20:32:59 +0800 Subject: [PATCH] feat: support manifest --- .drone.jsonnet | 11 +++++++++++ .drone.yml | 11 +++++++++++ docker/manifest.tmpl | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 docker/manifest.tmpl diff --git a/.drone.jsonnet b/.drone.jsonnet index cf8725e..a0797c6 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -249,6 +249,17 @@ local PipelineNotifications(os='linux', arch='amd64', depends_on=[]) = { disable: true, }, steps: [ + { + name: 'manifest', + image: 'plugins/manifest', + pull: 'always', + settings: { + username: { from_secret: 'docker_username' }, + password: { from_secret: 'docker_password' }, + spec: 'docker/manifest.tmpl', + ignore_missing: true, + }, + }, { name: 'microbadger', image: 'plugins/webhook:1', diff --git a/.drone.yml b/.drone.yml index 6b0a5cb..1c5fd46 100644 --- a/.drone.yml +++ b/.drone.yml @@ -367,6 +367,17 @@ clone: disable: true steps: +- name: manifest + pull: always + image: plugins/manifest + settings: + ignore_missing: true + password: + from_secret: docker_password + spec: docker/manifest.tmpl + username: + from_secret: docker_username + - name: microbadger pull: always image: plugins/webhook:1 diff --git a/docker/manifest.tmpl b/docker/manifest.tmpl new file mode 100644 index 0000000..0c4fddf --- /dev/null +++ b/docker/manifest.tmpl @@ -0,0 +1,37 @@ +image: appleboy/drone-telegram:{{#if build.tag}}{{trimPrefix build.tag "v"}}{{else}}latest{{/if}} +{{#if build.tags}} +tags: +{{#each build.tags}} + - {{this}} +{{/each}} +{{/if}} +manifests: + - + image: appleboy/drone-telegram:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}linux-amd64 + platform: + architecture: amd64 + os: linux + - + image: appleboy/drone-telegram:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}linux-arm64 + platform: + architecture: arm64 + os: linux + variant: v8 + - + image: appleboy/drone-telegram:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}linux-arm + platform: + architecture: arm + os: linux + variant: v7 + - + image: appleboy/drone-telegram:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}windows-1803 + platform: + architecture: amd64 + os: windows + version: 1803 + - + image: appleboy/drone-telegram:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}windows-1809 + platform: + architecture: amd64 + os: windows + version: 1809