configure drone to build images on different branches
@@ -24,7 +24,7 @@ steps:
- name: socket
path: /var/run/docker.sock
-- name: publish-master-image
+- name: publish-image
image: plugins/docker
settings:
build_args:
@@ -34,12 +34,10 @@ steps:
password:
from_secret: docker_password
repo: longhornio/longhorn-manager
- tag: "master-amd64"
+ tag: "${DRONE_BRANCH}-head-amd64"
username:
from_secret: docker_username
when:
- branch:
- - master
event:
- push
@@ -57,8 +55,6 @@ steps:
username:
from_secret: docker_username
when:
- branch:
- - master
event:
- tag
@@ -109,7 +105,7 @@ steps:
- name: socket
path: /var/run/docker.sock
-- name: publish-master-image
+- name: publish-image
image: plugins/docker
settings:
build_args:
@@ -119,12 +115,10 @@ steps:
password:
from_secret: docker_password
repo: longhornio/longhorn-manager
- tag: "master-arm64"
+ tag: "${DRONE_BRANCH}-head-arm64"
username:
from_secret: docker_username
when:
- branch:
- - master
event:
- push
@@ -142,8 +136,6 @@ steps:
username:
from_secret: docker_username
when:
- branch:
- - master
event:
- tag
@@ -178,7 +170,7 @@ platform:
arch: amd64
steps:
-- name: manifest-master
+- name: manifest
image: plugins/manifest:1
settings:
username:
@@ -188,13 +180,11 @@ steps:
platforms:
- linux/amd64
- linux/arm64
- target: "longhornio/longhorn-manager:master"
- template: "longhornio/longhorn-manager:master-ARCH"
+ target: "longhornio/longhorn-manager:${DRONE_BRANCH}-head"
+ template: "longhornio/longhorn-manager:${DRONE_BRANCH}-head-ARCH"
when:
instance:
- drone-publish.longhorn.io
- branch:
- - master
event:
- push
@@ -213,8 +203,6 @@ steps:
when:
instance:
- drone-publish.longhorn.io
- branch:
- - master
event:
- tag
