From cb53c38232d1204cbdc7b205d75d4b1ff92de56a Mon Sep 17 00:00:00 2001 From: Martin Honermeyer Date: Wed, 10 Jul 2019 21:36:58 +0200 Subject: [PATCH] Add drone build configuration --- .drone.yml | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++ manifest.tmpl | 18 ++++++++++ 2 files changed, 111 insertions(+) create mode 100644 .drone.yml create mode 100644 manifest.tmpl diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..d3f3286 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,93 @@ +kind: pipeline +name: amd64 + +platform: + os: linux + arch: amd64 + +steps: + - name: build + image: plugins/docker + settings: + auto_tag: true + auto_tag_suffix: amd64 + repo: mazzolino/shepherd + username: + from_secret: docker_username + password: + from_secret: docker_password + when: + event: + exclude: + - pull_request + +--- +kind: pipeline +name: arm + +platform: + os: linux + arch: arm + +steps: + - name: build + image: plugins/docker:linux-arm + settings: + auto_tag: true + auto_tag_suffix: arm + repo: mazzolino/shepherd + username: + from_secret: docker_username + password: + from_secret: docker_password + when: + event: + exclude: + - pull_request + +--- +kind: pipeline +name: arm64 + +platform: + os: linux + arch: arm64 + +steps: + - name: build + image: plugins/docker:linux-arm64 + settings: + auto_tag: true + auto_tag_suffix: arm64 + repo: mazzolino/shepherd + username: + from_secret: docker_username + password: + from_secret: docker_password + when: + event: + exclude: + - pull_request +--- +kind: pipeline +name: manifest + +steps: + - name: manifest + image: plugins/manifest:1 + settings: + spec: manifest.tmpl + auto_tag: true + username: + from_secret: docker_username + password: + from_secret: docker_password + platforms: + - linux/amd64 + - linux/arm + - linux/arm64 + +depends_on: + - amd64 + - arm + - arm64 diff --git a/manifest.tmpl b/manifest.tmpl new file mode 100644 index 0000000..e655f39 --- /dev/null +++ b/manifest.tmpl @@ -0,0 +1,18 @@ +image: mazzolino/shepherd:{{#if build.tag}}{{trimPrefix build.tag "v"}}{{else}}latest{{/if}} +{{#if build.tags}} +tags: +{{#each build.tags}} + - {{this}} +{{/each}} +{{/if}} +manifests: + - + image: mazzolino/shepherd:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}amd64 + platform: + architecture: amd64 + os: linux + - + image: mazzolino/shepherd:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}arm + platform: + architecture: arm + os: linux