Refactor CI pipelien and enable molecule testing #1
@ -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,
|
||||
]
|
||||
|
41
.drone.yml
41
.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 }}**<br/> Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }}<br/> Message: {{ build.message }}"
|
||||
username:
|
||||
from_secret: matrix_username
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- "refs/tags/**"
|
||||
status:
|
||||
- success
|
||||
- failure
|
||||
|
||||
depends_on:
|
||||
- deployment
|
||||
|
||||
...
|
||||
|
Loading…
Reference in New Issue
Block a user