Refactor CI pipelien and enable molecule testing #1

Merged
xoxys merged 131 commits from molecule-dev into master 2019-03-25 21:23:40 +00:00
2 changed files with 50 additions and 2 deletions
Showing only changes of commit f49807ebf9 - Show all commits

View File

@ -26,6 +26,9 @@ local PipelineLinting = {
AnsibleVersions(version="latest", package="ansible"), AnsibleVersions(version="latest", package="ansible"),
AnsibleVersions(version="master", package="git+https://github.com/ansible/ansible.git@devel"), AnsibleVersions(version="master", package="git+https://github.com/ansible/ansible.git@devel"),
], ],
trigger: {
ref: ["refs/heads/master", "refs/tags/**", "refs/pull/**"],
},
}; };
local PipelineDeployment = { local PipelineDeployment = {
@ -66,6 +69,9 @@ local PipelineDeployment = {
depends_on: [ depends_on: [
"linting", "linting",
], ],
trigger: {
ref: ["refs/heads/master", "refs/tags/**"],
},
}; };
local PipelineNotifications = { local PipelineNotifications = {
@ -91,12 +97,13 @@ local PipelineNotifications = {
"deployment", "deployment",
], ],
trigger: { trigger: {
event: [ "push", "tag" ],
status: [ "success", "failure" ], status: [ "success", "failure" ],
ref: ["refs/heads/master", "refs/tags/**"],
}, },
}; };
[ [
PipelineLinting, PipelineLinting,
PipelineDeployment PipelineDeployment,
PipelineNotifications,
] ]

View File

@ -31,6 +31,12 @@ steps:
depends_on: depends_on:
- clone - clone
trigger:
ref:
- refs/heads/master
- "refs/tags/**"
- "refs/pull/**"
--- ---
kind: pipeline kind: pipeline
name: deployment name: deployment
@ -68,7 +74,42 @@ steps:
MOLECULE_CUSTOM_MODULES_REPO: https://gitea.rknet.org/ansible/custom_modules MOLECULE_CUSTOM_MODULES_REPO: https://gitea.rknet.org/ansible/custom_modules
PY_COLORS: 1 PY_COLORS: 1
trigger:
ref:
- refs/heads/master
- "refs/tags/**"
depends_on: depends_on:
- linting - 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
... ...