feat: support manifest

This commit is contained in:
Bo-Yi Wu 2019-02-17 20:32:59 +08:00
parent 0ac15da3e7
commit c3640b0765
3 changed files with 59 additions and 0 deletions

View File

@ -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',

View File

@ -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

37
docker/manifest.tmpl Normal file
View File

@ -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