From f1f8a48fa3a31a0aced8294888f8be5d36a2497e Mon Sep 17 00:00:00 2001 From: Timo N Date: Sun, 19 Jan 2020 22:39:45 +0100 Subject: [PATCH] [CI] Added automated testing using drone (#3278) --- .drone.yml | 120 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 00000000..264468ef --- /dev/null +++ b/.drone.yml @@ -0,0 +1,120 @@ +--- +kind: pipeline +name: integration-testing + +platform: + os: linux + arch: amd64 + +clone: + disable: true + +steps: + +- name: download-tests + pull: default + image: timovibritannia/ansible + commands: + - wget $TEST_DOWNLOAD_URL --quiet + - unzip -qq mailcow-integration-tests.zip + - rm mailcow-integration-tests.zip + environment: + TEST_DOWNLOAD_URL: + from_secret: TEST_DOWNLOAD_URL + when: + branch: + - master + event: + - push + +- name: lint + pull: default + image: timovibritannia/ansible + commands: + - ansible-lint ./ + when: + branch: + - master + event: + - push + +- name: create-server + pull: default + image: timovibritannia/ansible + commands: + - chmod +x ci.sh + - ./ci.sh + - ansible-playbook mailcow-start-server.yml --diff + environment: + ANSIBLE_HOST_KEY_CHECKING: false + ANSIBLE_FORCE_COLOR: true + VAULT_PW: + from_secret: VAULT_PW + when: + branch: + - master + event: + - push + +- name: setup-server + pull: default + image: timovibritannia/ansible + commands: + - chmod +x ci.sh + - ./ci.sh + - sleep 60 + - ansible-playbook mailcow-setup-server.yml --private-key /drone/src/id_ssh_rsa --diff + environment: + ANSIBLE_HOST_KEY_CHECKING: false + ANSIBLE_FORCE_COLOR: true + VAULT_PW: + from_secret: VAULT_PW + when: + branch: + - master + event: + - push + +- name: run-tests + pull: default + image: timovibritannia/ansible + commands: + - chmod +x ci.sh + - ./ci.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 + VAULT_PW: + from_secret: VAULT_PW + when: + branch: + - master + event: + - push + +- name: delete-server + pull: default + image: timovibritannia/ansible + commands: + - chmod +x ci.sh + - ./ci.sh + - ansible-playbook mailcow-delete-server.yml --diff + environment: + ANSIBLE_HOST_KEY_CHECKING: false + ANSIBLE_FORCE_COLOR: true + VAULT_PW: + from_secret: VAULT_PW + when: + branch: + - master + event: + - push + status: + - failure + - success +--- +kind: signature +hmac: d45bd1594ef12eb12b0035eb787d3372a6693825d8dbeb75c339979302b3941c + +...