mailcow/.drone.yml

121 lines
2.4 KiB
YAML
Raw Normal View History

---
kind: pipeline
name: integration-testing
platform:
os: linux
arch: amd64
clone:
disable: true
steps:
2020-03-22 22:02:26 +08:00
- name: prepare-tests
pull: default
image: timovibritannia/ansible
commands:
2020-01-30 00:16:25 +08:00
- git clone https://github.com/mailcow/mailcow-integration-tests.git --branch $(curl -sL https://api.github.com/repos/mailcow/mailcow-integration-tests/releases/latest | jq -r '.tag_name') --single-branch .
2020-03-22 22:02:26 +08:00
- chmod +x ci.sh
- chmod +x ci-ssh.sh
- chmod +x ci-piprequierments.sh
- ./ci.sh
- wget -O group_vars/all/secrets.yml $SECRETS_DOWNLOAD_URL --quiet
environment:
SECRETS_DOWNLOAD_URL:
from_secret: SECRETS_DOWNLOAD_URL
2020-03-22 22:02:26 +08:00
VAULT_PW:
from_secret: VAULT_PW
when:
branch:
- master
2021-11-27 20:29:02 +08:00
- staging
event:
- push
- name: lint
pull: default
image: timovibritannia/ansible
commands:
- ansible-lint ./
when:
branch:
- master
2021-11-27 20:29:02 +08:00
- staging
event:
- push
- name: create-server
pull: default
image: timovibritannia/ansible
commands:
2020-03-22 22:02:26 +08:00
- ./ci-piprequierments.sh
- ansible-playbook mailcow-start-server.yml --diff
2020-03-22 22:02:26 +08:00
- ./ci-ssh.sh
environment:
ANSIBLE_HOST_KEY_CHECKING: false
ANSIBLE_FORCE_COLOR: true
when:
branch:
- master
2021-11-27 20:29:02 +08:00
- staging
event:
- push
- name: setup-server
pull: default
image: timovibritannia/ansible
commands:
- sleep 120
2020-03-22 22:02:26 +08:00
- ./ci-piprequierments.sh
- ansible-playbook mailcow-setup-server.yml --private-key /drone/src/id_ssh_rsa --diff
environment:
ANSIBLE_HOST_KEY_CHECKING: false
ANSIBLE_FORCE_COLOR: true
when:
branch:
- master
2021-11-27 20:29:02 +08:00
- staging
event:
- push
- name: run-tests
pull: default
image: timovibritannia/ansible
commands:
2020-03-22 22:02:26 +08:00
- ./ci-piprequierments.sh
- ansible-playbook mailcow-integration-tests.yml --private-key /drone/src/id_ssh_rsa --diff
environment:
ANSIBLE_HOST_KEY_CHECKING: false
ANSIBLE_FORCE_COLOR: true
when:
branch:
- master
2021-11-27 20:29:02 +08:00
- staging
event:
- push
- name: delete-server
pull: default
image: timovibritannia/ansible
commands:
2020-03-22 22:02:26 +08:00
- ./ci-piprequierments.sh
- ansible-playbook mailcow-delete-server.yml --diff
environment:
ANSIBLE_HOST_KEY_CHECKING: false
ANSIBLE_FORCE_COLOR: true
when:
branch:
- master
2021-11-27 20:29:02 +08:00
- staging
event:
- push
status:
- failure
- success
2020-03-22 22:02:26 +08:00
---
kind: signature
2021-11-27 20:29:02 +08:00
hmac: f6619243fe2a27563291c9f2a46d93ffbc3b6dced9a05f23e64b555ce03a31e5
...