use latest drone and also build arm64 image (#2)

This commit is contained in:
techknowlogick 2019-07-10 21:44:00 -04:00 коммит произвёл GitHub
Родитель e47ca249e4
Коммит 186c709a6f
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 108 добавлений и 32 удалений

Просмотреть файл

@ -1,38 +1,101 @@
workspace:
base: /srv/app
path: src
---
kind: pipeline
name: amd64-pipeline
clone:
git:
image: plugins/git:1
depth: 50
tags: true
platform:
os: linux
arch: amd64
pipeline:
docker:
image: plugins/docker:17.05
pull: true
secrets: [ docker_username, docker_password ]
steps:
- name: dryrun
pull: always
image: plugins/docker:latest
settings:
dry_run: true
repo: gitea/test-openldap
tags: [ '${DRONE_BRANCH##release/v}' ]
tags: latest-amd64
when:
event: [ push ]
branch: [ release/* ]
event:
- pull_request
docker:
image: plugins/docker:17.05
pull: true
secrets: [ docker_username, docker_password ]
- name: publish
pull: always
image: plugins/docker:latest
settings:
repo: gitea/test-openldap
tags: [ 'latest' ]
tags: latest-amd64
environment:
DOCKER_PASSWORD:
from_secret: docker_password
DOCKER_USERNAME:
from_secret: docker_username
when:
event: [ push ]
branch: [ master ]
branch:
- master
event:
- push
discord:
image: appleboy/drone-discord:1.0.0
pull: true
secrets: [ discord_webhook_id, discord_webhook_token ]
---
kind: pipeline
name: arm64-pipeline
platform:
os: linux
arch: arm64
steps:
- name: dryrun
pull: always
image: plugins/docker:latest
settings:
dry_run: true
repo: gitea/test-openldap
tags: latest-arm64
when:
event: [ push, tag, pull_request ]
status: [ changed, failure ]
event:
- pull_request
- name: publish
pull: always
image: plugins/docker:latest
settings:
repo: gitea/test-openldap
tags: latest-arm64
environment:
DOCKER_PASSWORD:
from_secret: docker_password
DOCKER_USERNAME:
from_secret: docker_username
when:
branch:
- master
event:
- push
---
kind: pipeline
name: manifest-latest
platform:
os: linux
arch: amd64
steps:
- name: manifest
pull: always
image: plugins/manifest:1
settings:
ignore_missing: true
password:
from_secret: docker_password
spec: manifest.tmpl
username:
from_secret: docker_username
trigger:
ref:
- refs/heads/master
depends_on:
- amd64-pipeline
- arm64-pipeline

13
manifest.tmpl Normal file
Просмотреть файл

@ -0,0 +1,13 @@
image: gitea/test-openldap:latest
manifests:
-
image: gitea/test-openldap:latest-amd64
platform:
architecture: amd64
os: linux
-
image: gitea/test-openldap:latest-arm64v8
platform:
architecture: arm64
os: linux
variant: v8