Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 1 | --- |
| 2 | kind: pipeline |
| 3 | name: integration-testing |
| 4 | |
| 5 | platform: |
| 6 | os: linux |
| 7 | arch: amd64 |
| 8 | |
| 9 | clone: |
| 10 | disable: true |
| 11 | |
| 12 | steps: |
| 13 | - name: prepare-tests |
| 14 | pull: default |
| 15 | image: timovibritannia/ansible |
| 16 | commands: |
| 17 | - 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 . |
| 18 | - chmod +x ci.sh |
| 19 | - chmod +x ci-ssh.sh |
| 20 | - chmod +x ci-piprequierments.sh |
| 21 | - ./ci.sh |
| 22 | - wget -O group_vars/all/secrets.yml $SECRETS_DOWNLOAD_URL --quiet |
| 23 | environment: |
| 24 | SECRETS_DOWNLOAD_URL: |
| 25 | from_secret: SECRETS_DOWNLOAD_URL |
| 26 | VAULT_PW: |
| 27 | from_secret: VAULT_PW |
| 28 | when: |
| 29 | branch: |
| 30 | - master |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 31 | - staging |
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 32 | event: |
| 33 | - push |
| 34 | |
| 35 | - name: lint |
| 36 | pull: default |
| 37 | image: timovibritannia/ansible |
| 38 | commands: |
| 39 | - ansible-lint ./ |
| 40 | when: |
| 41 | branch: |
| 42 | - master |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 43 | - staging |
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 44 | event: |
| 45 | - push |
| 46 | |
| 47 | - name: create-server |
| 48 | pull: default |
| 49 | image: timovibritannia/ansible |
| 50 | commands: |
| 51 | - ./ci-piprequierments.sh |
| 52 | - ansible-playbook mailcow-start-server.yml --diff |
| 53 | - ./ci-ssh.sh |
| 54 | environment: |
| 55 | ANSIBLE_HOST_KEY_CHECKING: false |
| 56 | ANSIBLE_FORCE_COLOR: true |
| 57 | when: |
| 58 | branch: |
| 59 | - master |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 60 | - staging |
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 61 | event: |
| 62 | - push |
| 63 | |
| 64 | - name: setup-server |
| 65 | pull: default |
| 66 | image: timovibritannia/ansible |
| 67 | commands: |
| 68 | - sleep 120 |
| 69 | - ./ci-piprequierments.sh |
| 70 | - ansible-playbook mailcow-setup-server.yml --private-key /drone/src/id_ssh_rsa --diff |
| 71 | environment: |
| 72 | ANSIBLE_HOST_KEY_CHECKING: false |
| 73 | ANSIBLE_FORCE_COLOR: true |
| 74 | when: |
| 75 | branch: |
| 76 | - master |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 77 | - staging |
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 78 | event: |
| 79 | - push |
| 80 | |
| 81 | - name: run-tests |
| 82 | pull: default |
| 83 | image: timovibritannia/ansible |
| 84 | commands: |
| 85 | - ./ci-piprequierments.sh |
| 86 | - ansible-playbook mailcow-integration-tests.yml --private-key /drone/src/id_ssh_rsa --diff |
| 87 | environment: |
| 88 | ANSIBLE_HOST_KEY_CHECKING: false |
| 89 | ANSIBLE_FORCE_COLOR: true |
| 90 | when: |
| 91 | branch: |
| 92 | - master |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 93 | - staging |
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 94 | event: |
| 95 | - push |
| 96 | |
| 97 | - name: delete-server |
| 98 | pull: default |
| 99 | image: timovibritannia/ansible |
| 100 | commands: |
| 101 | - ./ci-piprequierments.sh |
| 102 | - ansible-playbook mailcow-delete-server.yml --diff |
| 103 | environment: |
| 104 | ANSIBLE_HOST_KEY_CHECKING: false |
| 105 | ANSIBLE_FORCE_COLOR: true |
| 106 | when: |
| 107 | branch: |
| 108 | - master |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 109 | - staging |
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 110 | event: |
| 111 | - push |
| 112 | status: |
| 113 | - failure |
| 114 | - success |
| 115 | |
| 116 | --- |
| 117 | kind: signature |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 118 | hmac: f6619243fe2a27563291c9f2a46d93ffbc3b6dced9a05f23e64b555ce03a31e5 |
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 119 | |
| 120 | ... |