xoxys.nginx/.drone.yml

64 lines
1.9 KiB
YAML
Raw Normal View History

2019-01-12 13:49:56 +01:00
---
kind: pipeline
name: default
2019-02-27 22:46:32 +01:00
workspace:
2019-02-27 22:53:45 +01:00
base: /drone/src
path: xoxys.nginx
2019-02-27 16:29:57 +01:00
2019-02-27 22:47:08 +01:00
steps:
2019-02-26 15:13:50 +01:00
# - name: ansible-latest
# image: python:2.7
# pull: always
# commands:
# - pip install ansible ansible-later -q
# - 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 ]
# - name: ansible-master
# image: python:2.7
# pull: always
# commands:
# - pip install ansible ansible-later -q
# - 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 ]
2019-01-09 20:57:15 +01:00
2019-02-27 23:10:25 +01:00
- name: dependencies
image: docker:git
commands:
2019-02-27 23:13:03 +01:00
- pwd
2019-02-27 23:10:25 +01:00
- git clone https://gitea.rknet.org/ansible/custom_modules
2019-02-27 23:13:03 +01:00
- ls -l
2019-02-27 23:10:25 +01:00
2019-02-26 15:13:50 +01:00
- name: molecule
2019-02-27 11:22:43 +01:00
image: quay.io/ansible/molecule
2019-01-12 13:49:56 +01:00
pull: always
2019-02-27 11:21:12 +01:00
environment:
2019-02-27 12:04:35 +01:00
GCE_SSH_KEY:
from_secret: gce_ssh_key
GCE_SERVICE_ACCOUNT_EMAIL:
from_secret: gce_service_account_email
GCE_PROJECT_ID:
from_secret: gce_project_id
GCE_CREDENTIALS_JSON:
from_secret: gce_credentials_json
2019-02-27 14:06:42 +01:00
GCE_SSH_USER:
from_secret: gce_ssh_user
2019-02-27 12:04:35 +01:00
GCE_CREDENTIALS_FILE: $HOME/ansible-testing.json
2019-02-27 16:18:08 +01:00
ANSIBLE_TIMEOUT: 60
2019-02-27 22:53:45 +01:00
ANSIBLE_ROLES_PATH: /drone/src
2019-02-27 23:09:11 +01:00
ANSIBLE_LIBRARY: /drone/src/custom_modules
2019-01-09 20:57:15 +01:00
commands:
2019-02-27 23:13:03 +01:00
- ls -l
2019-02-27 22:53:45 +01:00
- mkdir $HOME/.ssh
- echo "$GCE_SSH_KEY" > $HOME/.ssh/google_compute_engine
- chmod 600 $HOME/.ssh/google_compute_engine
- echo "$GCE_CREDENTIALS_JSON" > $HOME/ansible-testing.json
- pip install apache-libcloud pycrypto --user
- 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