Skip to content

Commit

Permalink
Add drone build configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
djmaze committed Jul 10, 2019
1 parent f5b229d commit cb53c38
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 0 deletions.
93 changes: 93 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -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
18 changes: 18 additions & 0 deletions manifest.tmpl
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit cb53c38

Please sign in to comment.