xoxys.nginx/.drone.yml
Robert Kaussow 55cfc3a241
All checks were successful
continuous-integration/drone/push Build is passing
separate linting and deployment tests for better depenedency handling
2019-03-01 11:53:27 +01:00

78 lines
1.8 KiB
YAML

---
kind: pipeline
name: linting
platform:
os: linux
arch: amd64
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
- 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
---
kind: pipeline
name: deployment
platform:
os: linux
arch: amd64
workspace:
base: /drone/src
path: xoxys.nginx
steps:
- name: molecule
pull: always
image: xoxys/molecule:gce
commands:
- mkdir ./library/
- git clone https://gitea.rknet.org/ansible/custom_modules ./library/
- "echo \"$GCE_SSH_KEY\" > $HOME/.ssh/google_compute_engine"
- chmod 600 $HOME/.ssh/google_compute_engine
- "echo \"$GCE_CREDENTIALS_JSON\" > $HOME/ansible-testing.json"
- 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
PY_COLORS: 1
depends_on:
- linting
...