This commit is contained in:
parent
56bc922592
commit
da8c5f7505
69
.drone.jsonnet
Normal file
69
.drone.jsonnet
Normal file
@ -0,0 +1,69 @@
|
||||
local AnsibleVersions(version="latest", package="ansible") = {
|
||||
name: "ansible-" + version,
|
||||
image: "python:3.7",
|
||||
pull: "always",
|
||||
environment: {
|
||||
PY_COLORS: 1
|
||||
},
|
||||
commands: [
|
||||
"pip install " + package + " ansible-later~=0.2.0 -qq",
|
||||
"git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy",
|
||||
"ansible-later -c ~/policy/config.yml"
|
||||
],
|
||||
depends_on: [
|
||||
"clone",
|
||||
],
|
||||
};
|
||||
|
||||
local PipelineLinting = {
|
||||
kind: "pipeline",
|
||||
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"),
|
||||
],
|
||||
trigger: {
|
||||
ref: ["refs/heads/master", "refs/tags/**", "refs/pull/**"],
|
||||
},
|
||||
};
|
||||
|
||||
local PipelineNotifications = {
|
||||
kind: "pipeline",
|
||||
name: "notifications",
|
||||
platform: {
|
||||
os: "linux",
|
||||
arch: "amd64",
|
||||
},
|
||||
clone: {
|
||||
disable: true,
|
||||
},
|
||||
steps: [
|
||||
{
|
||||
name: "matrix",
|
||||
image: "plugins/matrix",
|
||||
settings: {
|
||||
homeserver: "https://matrix.rknet.org",
|
||||
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" },
|
||||
password: { "from_secret": "matrix_password" },
|
||||
},
|
||||
},
|
||||
],
|
||||
depends_on: [
|
||||
"linting",
|
||||
],
|
||||
trigger: {
|
||||
status: [ "success", "failure" ],
|
||||
ref: ["refs/heads/master", "refs/tags/**"],
|
||||
},
|
||||
};
|
||||
|
||||
[
|
||||
PipelineLinting,
|
||||
PipelineNotifications,
|
||||
]
|
78
.drone.yml
78
.drone.yml
@ -1,22 +1,78 @@
|
||||
---
|
||||
kind: pipeline
|
||||
name: default
|
||||
name: linting
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
steps:
|
||||
- name: ansible-latest
|
||||
image: python:2.7
|
||||
- name: ansible-latest
|
||||
pull: always
|
||||
image: python:3.7
|
||||
commands:
|
||||
- pip install ansible ansible-later -q
|
||||
- pip install ansible ansible-later~=0.2.0 -qq
|
||||
- git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy
|
||||
- git ls-files *[^LICENSE,.md] | xargs ansible-later -c ~/policy/config.ini
|
||||
depends_on: [ clone ]
|
||||
- ansible-later -c ~/policy/config.yml
|
||||
environment:
|
||||
PY_COLORS: 1
|
||||
depends_on:
|
||||
- clone
|
||||
|
||||
- name: ansible-master
|
||||
image: python:2.7
|
||||
- name: ansible-master
|
||||
pull: always
|
||||
image: python:3.7
|
||||
commands:
|
||||
- pip install ansible ansible-later -q
|
||||
- "pip install git+https://github.com/ansible/ansible.git@devel ansible-later~=0.2.0 -qq"
|
||||
- git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy
|
||||
- git ls-files *[^LICENSE,.md] | xargs ansible-later -c ~/policy/config.ini
|
||||
depends_on: [ clone ]
|
||||
- ansible-later -c ~/policy/config.yml
|
||||
environment:
|
||||
PY_COLORS: 1
|
||||
depends_on:
|
||||
- clone
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/master
|
||||
- "refs/tags/**"
|
||||
- "refs/pull/**"
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: notifications
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
steps:
|
||||
- name: matrix
|
||||
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:
|
||||
- linting
|
||||
|
||||
---
|
||||
kind: signature
|
||||
hmac: e8af892af990dc7b107f23e9c2e573a4be5691285d8925ae90138cec276278ad
|
||||
|
||||
...
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
- import_tasks: redhat.yml
|
||||
when: "'redhat' in group_names or 'redhat-arm' in group_names"
|
||||
when: "'redhat' in group_names or 'redhat_arm' in group_names"
|
||||
|
||||
- import_tasks: debian.yml
|
||||
when: "'debian' in group_names or 'debian-pve' in group_names or 'debian-ucs' in group_names"
|
||||
when: "'debian' in group_names or 'debian_pve' in group_names or 'debian_ucs' in group_names"
|
||||
|
Loading…
Reference in New Issue
Block a user