blob: acc2263a45b46fae4b2b977e4ddea94f39376ca3 [file] [log] [blame]
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +01001---
2kind: pipeline
3name: integration-testing
4
5platform:
6 os: linux
7 arch: amd64
8
9clone:
10 disable: true
11
12steps:
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
31 event:
32 - push
33
34- name: lint
35 pull: default
36 image: timovibritannia/ansible
37 commands:
38 - ansible-lint ./
39 when:
40 branch:
41 - master
42 event:
43 - push
44
45- name: create-server
46 pull: default
47 image: timovibritannia/ansible
48 commands:
49 - ./ci-piprequierments.sh
50 - ansible-playbook mailcow-start-server.yml --diff
51 - ./ci-ssh.sh
52 environment:
53 ANSIBLE_HOST_KEY_CHECKING: false
54 ANSIBLE_FORCE_COLOR: true
55 when:
56 branch:
57 - master
58 event:
59 - push
60
61- name: setup-server
62 pull: default
63 image: timovibritannia/ansible
64 commands:
65 - sleep 120
66 - ./ci-piprequierments.sh
67 - ansible-playbook mailcow-setup-server.yml --private-key /drone/src/id_ssh_rsa --diff
68 environment:
69 ANSIBLE_HOST_KEY_CHECKING: false
70 ANSIBLE_FORCE_COLOR: true
71 when:
72 branch:
73 - master
74 event:
75 - push
76
77- name: run-tests
78 pull: default
79 image: timovibritannia/ansible
80 commands:
81 - ./ci-piprequierments.sh
82 - ansible-playbook mailcow-integration-tests.yml --private-key /drone/src/id_ssh_rsa --diff
83 environment:
84 ANSIBLE_HOST_KEY_CHECKING: false
85 ANSIBLE_FORCE_COLOR: true
86 when:
87 branch:
88 - master
89 event:
90 - push
91
92- name: delete-server
93 pull: default
94 image: timovibritannia/ansible
95 commands:
96 - ./ci-piprequierments.sh
97 - ansible-playbook mailcow-delete-server.yml --diff
98 environment:
99 ANSIBLE_HOST_KEY_CHECKING: false
100 ANSIBLE_FORCE_COLOR: true
101 when:
102 branch:
103 - master
104 event:
105 - push
106 status:
107 - failure
108 - success
109
110---
111kind: signature
112hmac: 78793b0d115828cf74f6dbac3341205c6d48ef2e59661529f3412f2fac3831a9
113
114...