From f49807ebf91e77a14b4f3aec2ac2a3179d84f2ff Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 25 Mar 2019 22:17:21 +0100 Subject: [PATCH] small pipeline fixes --- .drone.jsonnet | 11 +++++++++-- .drone.yml | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 2 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index a4dae3a..536a42f 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -26,6 +26,9 @@ local PipelineLinting = { AnsibleVersions(version="latest", package="ansible"), AnsibleVersions(version="master", package="git+https://github.com/ansible/ansible.git@devel"), ], + trigger: { + ref: ["refs/heads/master", "refs/tags/**", "refs/pull/**"], + }, }; local PipelineDeployment = { @@ -66,6 +69,9 @@ local PipelineDeployment = { depends_on: [ "linting", ], + trigger: { + ref: ["refs/heads/master", "refs/tags/**"], + }, }; local PipelineNotifications = { @@ -91,12 +97,13 @@ local PipelineNotifications = { "deployment", ], trigger: { - event: [ "push", "tag" ], status: [ "success", "failure" ], + ref: ["refs/heads/master", "refs/tags/**"], }, }; [ PipelineLinting, - PipelineDeployment + PipelineDeployment, + PipelineNotifications, ] diff --git a/.drone.yml b/.drone.yml index a9a5416..27bb1c6 100644 --- a/.drone.yml +++ b/.drone.yml @@ -31,6 +31,12 @@ steps: depends_on: - clone +trigger: + ref: + - refs/heads/master + - "refs/tags/**" + - "refs/pull/**" + --- kind: pipeline name: deployment @@ -68,7 +74,42 @@ steps: MOLECULE_CUSTOM_MODULES_REPO: https://gitea.rknet.org/ansible/custom_modules PY_COLORS: 1 +trigger: + ref: + - refs/heads/master + - "refs/tags/**" + depends_on: - linting +--- +kind: pipeline +name: notifications + +platform: + os: linux + arch: amd64 + +steps: +- image: plugins/matrix + settings: + homeserver: https://matrix.rknet.org + password: + from_secret: matrix_password + roomid: MtidqQXWWAtQcByBhH:rknet.org + template: "Status: **{{ build.status }}**
Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }}
Message: {{ build.message }}" + username: + from_secret: matrix_username + +trigger: + ref: + - refs/heads/master + - "refs/tags/**" + status: + - success + - failure + +depends_on: +- deployment + ...