2019-01-12 12:45:39 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
2019-05-12 14:13:18 +00:00
|
|
|
name: linting
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: ansible-latest
|
|
|
|
pull: always
|
|
|
|
image: python:3.7
|
|
|
|
commands:
|
|
|
|
- pip install ansible ansible-later~=0.2.0 -qq
|
|
|
|
- git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy
|
|
|
|
- ansible-later -c ~/policy/config.yml
|
|
|
|
environment:
|
|
|
|
PY_COLORS: 1
|
|
|
|
depends_on:
|
|
|
|
- clone
|
|
|
|
|
|
|
|
- name: ansible-master
|
|
|
|
pull: always
|
|
|
|
image: python:3.7
|
|
|
|
commands:
|
|
|
|
- "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
|
|
|
|
- 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: deployment
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
|
|
|
workspace:
|
|
|
|
base: /drone/src
|
2019-05-12 14:23:51 +00:00
|
|
|
path: xoxys.docker-engine
|
2019-05-12 14:13:18 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: molecule
|
|
|
|
pull: always
|
|
|
|
image: xoxys/molecule:ec2-linux-amd64
|
|
|
|
commands:
|
|
|
|
- /bin/bash /docker-entrypoint.sh
|
2019-05-12 15:44:18 +00:00
|
|
|
- mkdir -p ./plugins/filters/
|
|
|
|
- wget -P ./plugins/filters/ https://gitea.rknet.org/xoxys/ansible-dc/raw/branch/master/custom/filter/wrap.py
|
|
|
|
- wget -P ./plugins/filters/ https://gitea.rknet.org/xoxys/ansible-dc/raw/branch/master/custom/filter/prefix.py
|
2019-05-12 14:13:18 +00:00
|
|
|
- molecule create --scenario-name ec2-centos-7
|
|
|
|
- molecule converge --scenario-name ec2-centos-7
|
|
|
|
- molecule verify --scenario-name ec2-centos-7
|
|
|
|
- molecule destroy --scenario-name ec2-centos-7
|
|
|
|
environment:
|
|
|
|
ANSIBLE_ROLES_PATH: /drone/src
|
|
|
|
AWS_ACCESS_KEY_ID:
|
|
|
|
from_secret: aws_access_key_id
|
|
|
|
AWS_REGION: eu-central-1
|
|
|
|
AWS_SECRET_ACCESS_KEY:
|
|
|
|
from_secret: aws_secret_access_key
|
|
|
|
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
|
|
|
|
|
|
|
|
clone:
|
|
|
|
disable: true
|
2019-01-12 12:45:39 +00:00
|
|
|
|
|
|
|
steps:
|
2019-05-12 14:13:18 +00:00
|
|
|
- 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:
|
|
|
|
- deployment
|
|
|
|
|
2019-05-12 14:23:51 +00:00
|
|
|
---
|
|
|
|
kind: signature
|
|
|
|
hmac: 827831324e9bbff40c494395e6b86057200c189dadb7dd4e51bb174786cf17ea
|
|
|
|
|
2019-05-12 14:13:18 +00:00
|
|
|
...
|