blob: 8587219f8f6fb7e9c9cd172ed7dd18d855decbf3 [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
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010031 - staging
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +010032 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 Benkard12a57352021-12-28 18:02:04 +010043 - staging
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +010044 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 Benkard12a57352021-12-28 18:02:04 +010060 - staging
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +010061 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 Benkard12a57352021-12-28 18:02:04 +010077 - staging
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +010078 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 Benkard12a57352021-12-28 18:02:04 +010093 - staging
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +010094 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 Benkard12a57352021-12-28 18:02:04 +0100109 - staging
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100110 event:
111 - push
112 status:
113 - failure
114 - success
115
116---
117kind: signature
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +0100118hmac: f6619243fe2a27563291c9f2a46d93ffbc3b6dced9a05f23e64b555ce03a31e5
Matthias Andreas Benkardb382b102021-01-02 15:32:21 +0100119
120...