Refactor CI pipelien and enable molecule testing #1
@ -15,9 +15,22 @@ local AnsibleVersions(version="latest", package="ansible") = {
|
|||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
local PipelineTesting = {
|
local PipelineLinting = {
|
||||||
kind: "pipeline",
|
kind: "pipeline",
|
||||||
name: "testing",
|
name: "linting",
|
||||||
|
platform: {
|
||||||
|
os: "linux",
|
||||||
|
arch: "amd64",
|
||||||
|
},
|
||||||
|
steps: [
|
||||||
|
AnsibleVersions(version="latest", package="ansible"),
|
||||||
|
AnsibleVersions(version="master", package="git+https://github.com/ansible/ansible.git@devel"),
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
local PipelineDeployment = {
|
||||||
|
kind: "pipeline",
|
||||||
|
name: "deployment",
|
||||||
platform: {
|
platform: {
|
||||||
os: "linux",
|
os: "linux",
|
||||||
arch: "amd64",
|
arch: "amd64",
|
||||||
@ -27,8 +40,6 @@ local PipelineTesting = {
|
|||||||
path: "xoxys.nginx"
|
path: "xoxys.nginx"
|
||||||
},
|
},
|
||||||
steps: [
|
steps: [
|
||||||
AnsibleVersions(version="latest", package="ansible"),
|
|
||||||
AnsibleVersions(version="master", package="git+https://github.com/ansible/ansible.git@devel"),
|
|
||||||
{
|
{
|
||||||
name: "molecule",
|
name: "molecule",
|
||||||
image: "xoxys/molecule:gce",
|
image: "xoxys/molecule:gce",
|
||||||
@ -55,6 +66,9 @@ local PipelineTesting = {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
depends_on: [
|
||||||
|
"linting",
|
||||||
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
local PipelineNotifications = {
|
local PipelineNotifications = {
|
||||||
@ -77,7 +91,7 @@ local PipelineNotifications = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
depends_on: [
|
depends_on: [
|
||||||
"testing",
|
"deployment",
|
||||||
],
|
],
|
||||||
trigger: {
|
trigger: {
|
||||||
event: [ "push", "tag" ],
|
event: [ "push", "tag" ],
|
||||||
@ -86,5 +100,6 @@ local PipelineNotifications = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
[
|
[
|
||||||
PipelineTesting,
|
PipelineLinting,
|
||||||
|
PipelineDeployment
|
||||||
]
|
]
|
||||||
|
22
.drone.yml
22
.drone.yml
@ -1,15 +1,11 @@
|
|||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: testing
|
name: linting
|
||||||
|
|
||||||
platform:
|
platform:
|
||||||
os: linux
|
os: linux
|
||||||
arch: amd64
|
arch: amd64
|
||||||
|
|
||||||
workspace:
|
|
||||||
base: /drone/src
|
|
||||||
path: xoxys.nginx
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: ansible-latest
|
- name: ansible-latest
|
||||||
pull: always
|
pull: always
|
||||||
@ -35,6 +31,19 @@ steps:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- clone
|
- clone
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
name: deployment
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: amd64
|
||||||
|
|
||||||
|
workspace:
|
||||||
|
base: /drone/src
|
||||||
|
path: xoxys.nginx
|
||||||
|
|
||||||
|
steps:
|
||||||
- name: molecule
|
- name: molecule
|
||||||
pull: always
|
pull: always
|
||||||
image: xoxys/molecule:gce
|
image: xoxys/molecule:gce
|
||||||
@ -62,4 +71,7 @@ steps:
|
|||||||
from_secret: gce_ssh_user
|
from_secret: gce_ssh_user
|
||||||
PY_COLORS: 1
|
PY_COLORS: 1
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- linting
|
||||||
|
|
||||||
...
|
...
|
||||||
|
Loading…
Reference in New Issue
Block a user