Skip to content

Commit

Permalink
Merge pull request #24 from vincent99/master
Browse files Browse the repository at this point in the history
Separate branch and tag pipelines
  • Loading branch information
vincent99 committed Oct 24, 2019
2 parents e40620c + 78c7132 commit 686f489
Showing 1 changed file with 141 additions and 58 deletions.
199 changes: 141 additions & 58 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
kind: pipeline
name: test

trigger:
event:
- push
- pull_request
- tag

platform:
os: linux
arch: amd64
Expand All @@ -12,15 +18,20 @@ steps:
image: node:10
commands:
- scripts/ci
when:
event:
- push
- pull_request
- tag

---
kind: pipeline
name: docker
name: docker-branch

depends_on:
- test

trigger:
ref:
- "refs/heads/master"
- "refs/heads/*-dev"
event:
- push

platform:
os: linux
Expand All @@ -31,25 +42,54 @@ steps:
image: plugins/docker
settings:
dockerfile: Dockerfile
tag: ${DRONE_TAG=$DRONE_BRANCH}
tag: ${DRONE_BRANCH}
repo: rancherlabs/dashboard
username:
from_secret: docker_username
password:
from_secret: docker_password
when:
ref:
include:
- "refs/heads/master"
- "refs/heads/*-dev"
- "refs/tags/v*"
event:
- push
- tag

---
kind: pipeline
name: hosted
name: docker-tag

depends_on:
- test

trigger:
event:
- tag

platform:
os: linux
arch: amd64

steps:
- name: docker-image
image: plugins/docker
settings:
dockerfile: Dockerfile
tag: ${DRONE_TAG}
repo: rancherlabs/dashboard
username:
from_secret: docker_username
password:
from_secret: docker_password

---
kind: pipeline
name: hosted-branch

depends_on:
- test

trigger:
ref:
- "refs/heads/master"
- "refs/heads/*-dev"
event:
- push

platform:
os: linux
arch: amd64
Expand All @@ -60,15 +100,6 @@ steps:
image: node:10
commands:
- ./scripts/build-hosted
when:
ref:
include:
- "refs/heads/master"
- "refs/heads/*-dev"
- "refs/tags/*"
event:
- push
- tag

- name: upload
pull: default
Expand All @@ -77,23 +108,93 @@ steps:
acl:
- allUsers:READER
cache_control: "no-cache,must-revalidate"
source: dist/${DRONE_TAG=$DRONE_BRANCH}
target: releases.rancher.com/dashboard/${DRONE_TAG=$DRONE_BRANCH}
source: dist/${DRONE_BRANCH}
target: releases.rancher.com/dashboard/${DRONE_BRANCH}
token:
from_secret: google_auth_key
when:
ref:
include:
- "refs/heads/master"
- "refs/heads/*-dev"
- "refs/tags/*"
event:
- push
- tag

---
kind: pipeline
name: embedded
name: hosted-tag

depends_on:
- test

trigger:
event:
- tag

platform:
os: linux
arch: amd64

steps:
- name: build
pull: default
image: node:10
commands:
- ./scripts/build-hosted

- name: upload
pull: default
image: plugins/gcs
settings:
acl:
- allUsers:READER
cache_control: "no-cache,must-revalidate"
source: dist/${DRONE_TAG}
target: releases.rancher.com/dashboard/${DRONE_TAG}
token:
from_secret: google_auth_key

---
kind: pipeline
name: embedded-branch

depends_on:
- test

trigger:
ref:
- "refs/heads/master"
- "refs/heads/*-dev"
event:
- push

platform:
os: linux
arch: amd64

steps:
- name: build
pull: default
image: node:10
commands:
- ./scripts/build-embedded

- name: upload
pull: default
image: plugins/gcs
settings:
acl:
- allUsers:READER
cache_control: "no-cache,must-revalidate"
source: dist/${DRONE_BRANCH}.tar.gz
target: releases.rancher.com/dashboard/${DRONE_BRANCH}.tar.gz
token:
from_secret: google_auth_key

---
kind: pipeline
name: embedded-tag

depends_on:
- test

trigger:
event:
- tag

platform:
os: linux
arch: amd64
Expand All @@ -104,15 +205,6 @@ steps:
image: node:10
commands:
- ./scripts/build-embedded
when:
ref:
include:
- "refs/heads/master"
- "refs/heads/*-dev"
- "refs/tags/*"
event:
- push
- tag

- name: upload
pull: default
Expand All @@ -121,16 +213,7 @@ steps:
acl:
- allUsers:READER
cache_control: "no-cache,must-revalidate"
source: dist/${DRONE_TAG=$DRONE_BRANCH}.tar.gz
target: releases.rancher.com/dashboard/${DRONE_TAG=$DRONE_BRANCH}.tar.gz
source: dist/${DRONE_TAG}.tar.gz
target: releases.rancher.com/dashboard/${DRONE_TAG}.tar.gz
token:
from_secret: google_auth_key
when:
ref:
include:
- "refs/heads/master"
- "refs/heads/*-dev"
- "refs/tags/*"
event:
- push
- tag

0 comments on commit 686f489

Please sign in to comment.