fix pipeline conditions

This commit is contained in:
Robert Kaussow 2019-09-23 08:50:01 +02:00
parent b3ac69e4b2
commit 8e7573f81c
2 changed files with 64 additions and 14 deletions

View File

@ -35,10 +35,14 @@ local PipelineBuild(os='linux', arch='amd64', version='gce') = {
password: { from_secret: "docker_password" }, password: { from_secret: "docker_password" },
}, },
when: { when: {
branch: [ "master" ], ref: [
'refs/heads/master',
'refs/tags/**',
],
}, },
}, },
], ],
depends_on: [ "clone" ],
}; };
local PipelineNotifications(depends_on=[]) = { local PipelineNotifications(depends_on=[]) = {
@ -60,7 +64,11 @@ local PipelineNotifications(depends_on=[]) = {
spec: "docker/manifest.tmpl", spec: "docker/manifest.tmpl",
}, },
when: { when: {
branch: [ "master" ], ref: [
'refs/heads/master',
'refs/tags/**',
],
status: [ "success" ],
}, },
}, },
{ {
@ -80,6 +88,7 @@ local PipelineNotifications(depends_on=[]) = {
'refs/heads/master', 'refs/heads/master',
'refs/tags/**', 'refs/tags/**',
], ],
status: [ "success" ],
}, },
}, },
{ {
@ -89,10 +98,17 @@ local PipelineNotifications(depends_on=[]) = {
settings: { settings: {
urls: { from_secret: "microbadger_url" }, urls: { from_secret: "microbadger_url" },
}, },
when: {
status: [ "success" ],
ref: [
'refs/heads/master',
'refs/tags/**',
],
},
}, },
{ {
image: "plugins/matrix",
name: "matrix", name: "matrix",
image: "plugins/matrix",
pull: 'always', pull: 'always',
settings: { settings: {
homeserver: "https://matrix.rknet.org", homeserver: "https://matrix.rknet.org",
@ -103,6 +119,10 @@ local PipelineNotifications(depends_on=[]) = {
}, },
when: { when: {
status: [ "success", "failure" ], status: [ "success", "failure" ],
ref: [
'refs/heads/master',
'refs/tags/**',
],
}, },
}, },
], ],

View File

@ -33,8 +33,12 @@ steps:
username: username:
from_secret: docker_username from_secret: docker_username
when: when:
branch: ref:
- master - refs/heads/master
- "refs/tags/**"
depends_on:
- clone
--- ---
kind: pipeline kind: pipeline
@ -71,8 +75,12 @@ steps:
username: username:
from_secret: docker_username from_secret: docker_username
when: when:
branch: ref:
- master - refs/heads/master
- "refs/tags/**"
depends_on:
- clone
--- ---
kind: pipeline kind: pipeline
@ -109,8 +117,12 @@ steps:
username: username:
from_secret: docker_username from_secret: docker_username
when: when:
branch: ref:
- master - refs/heads/master
- "refs/tags/**"
depends_on:
- clone
--- ---
kind: pipeline kind: pipeline
@ -147,8 +159,12 @@ steps:
username: username:
from_secret: docker_username from_secret: docker_username
when: when:
branch: ref:
- master - refs/heads/master
- "refs/tags/**"
depends_on:
- clone
--- ---
kind: pipeline kind: pipeline
@ -170,8 +186,11 @@ steps:
username: username:
from_secret: docker_username from_secret: docker_username
when: when:
branch: ref:
- master - refs/heads/master
- "refs/tags/**"
status:
- success
- name: readme - name: readme
pull: always pull: always
@ -189,6 +208,8 @@ steps:
ref: ref:
- refs/heads/master - refs/heads/master
- "refs/tags/**" - "refs/tags/**"
status:
- success
- name: microbadger - name: microbadger
pull: always pull: always
@ -196,6 +217,12 @@ steps:
settings: settings:
urls: urls:
from_secret: microbadger_url from_secret: microbadger_url
when:
ref:
- refs/heads/master
- "refs/tags/**"
status:
- success
- name: matrix - name: matrix
pull: always pull: always
@ -209,6 +236,9 @@ steps:
username: username:
from_secret: matrix_username from_secret: matrix_username
when: when:
ref:
- refs/heads/master
- "refs/tags/**"
status: status:
- success - success
- failure - failure
@ -226,6 +256,6 @@ depends_on:
--- ---
kind: signature kind: signature
hmac: 0cdd1dbbed1db339ede0ce51c67f0757d906ce43a5fcf0dc7df60009d79334e1 hmac: 02f0b54951a4006be604f729f1eb474bec81a2cde701cee18a82e341af10f83f
... ...