2019-03-12 12:38:59 +00:00
|
|
|
# ---
|
|
|
|
# kind: pipeline
|
|
|
|
# name: linting
|
2019-03-01 10:48:32 +00:00
|
|
|
|
2019-03-12 12:38:59 +00:00
|
|
|
# platform:
|
|
|
|
# os: linux
|
|
|
|
# arch: amd64
|
2019-01-12 12:49:56 +00:00
|
|
|
|
2019-03-12 12:38:59 +00:00
|
|
|
# steps:
|
|
|
|
# - name: ansible-latest
|
|
|
|
# pull: always
|
|
|
|
# image: python:3.7
|
|
|
|
# commands:
|
|
|
|
# - pip install ansible ansible-later -qq
|
|
|
|
# - git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy
|
|
|
|
# - "git ls-files *[^LICENSE,.md,molecule,.ini] | xargs ansible-later -c ~/policy/config.ini"
|
|
|
|
# environment:
|
|
|
|
# PY_COLORS: 1
|
|
|
|
# depends_on:
|
|
|
|
# - clone
|
2019-03-01 10:48:32 +00:00
|
|
|
|
2019-03-12 12:38:59 +00:00
|
|
|
# - name: ansible-master
|
|
|
|
# pull: always
|
|
|
|
# image: python:3.7
|
|
|
|
# commands:
|
|
|
|
# - "pip install git+https://github.com/ansible/ansible.git@devel ansible-later -qq"
|
|
|
|
# - git clone https://gitea.rknet.org/ansible/ansible-later-policy.git ~/policy
|
|
|
|
# - "git ls-files *[^LICENSE,.md,molecule,.ini] | xargs ansible-later -c ~/policy/config.ini"
|
|
|
|
# environment:
|
|
|
|
# PY_COLORS: 1
|
|
|
|
# depends_on:
|
|
|
|
# - clone
|
2019-02-26 14:13:50 +00:00
|
|
|
|
2019-03-01 10:53:27 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: deployment
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
|
|
|
workspace:
|
|
|
|
base: /drone/src
|
|
|
|
path: xoxys.nginx
|
|
|
|
|
|
|
|
steps:
|
2019-03-01 10:48:32 +00:00
|
|
|
- name: molecule
|
|
|
|
pull: always
|
|
|
|
image: xoxys/molecule:gce
|
|
|
|
commands:
|
2019-03-12 12:34:32 +00:00
|
|
|
- /bin/bash /docker-entrypoint.sh
|
2019-03-12 12:45:13 +00:00
|
|
|
- "echo ${MOLECULE_CUSTOM_MODULES_REPO}"
|
2019-03-01 10:48:32 +00:00
|
|
|
- molecule create --scenario-name gce-centos-7
|
|
|
|
- molecule converge --scenario-name gce-centos-7
|
|
|
|
- molecule verify --scenario-name gce-centos-7
|
|
|
|
- molecule destroy --scenario-name gce-centos-7
|
|
|
|
environment:
|
|
|
|
GCE_CREDENTIALS_FILE: $HOME/ansible-testing.json
|
|
|
|
GCE_CREDENTIALS_JSON:
|
|
|
|
from_secret: gce_credentials_json
|
|
|
|
GCE_PROJECT_ID:
|
|
|
|
from_secret: gce_project_id
|
|
|
|
GCE_SERVICE_ACCOUNT_EMAIL:
|
|
|
|
from_secret: gce_service_account_email
|
|
|
|
GCE_SSH_KEY:
|
|
|
|
from_secret: gce_ssh_key
|
|
|
|
GCE_SSH_USER:
|
|
|
|
from_secret: gce_ssh_user
|
2019-03-12 10:47:30 +00:00
|
|
|
MOLECULE_CUSTOM_MODULES_REPO: https://gitea.rknet.org/ansible/custom_modules
|
2019-03-01 10:48:32 +00:00
|
|
|
PY_COLORS: 1
|
2019-01-09 19:57:15 +00:00
|
|
|
|
2019-03-12 12:39:22 +00:00
|
|
|
# depends_on:
|
|
|
|
# - linting
|
2019-03-01 10:53:27 +00:00
|
|
|
|
2019-03-12 12:39:22 +00:00
|
|
|
# ...
|