-
Notifications
You must be signed in to change notification settings - Fork 33
235 lines (211 loc) · 7.11 KB
/
enteprise.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
name: "enterprise"
on:
push:
branches:
- '**'
paths-ignore:
- 'docs/**'
- '*.md'
env:
DTAS_VERSION: v1.2.1
BUILD_NUMBER: ${{ github.run_id }}
PY_COLORS: 1
PYTHONUNBUFFERED: 1
jobs:
docker:
name: ${{ matrix.role.name }} on ${{ matrix.molecule_distro.image }}
runs-on: ubuntu-latest
if: github.repository_owner == 'Alfresco'
strategy:
fail-fast: true
matrix:
molecule_distro:
- image: ubuntu:20.04
- image: rockylinux:8.7
role:
- name: adf_app
- name: search_enterprise
- name: repository
- name: sfs
- name: sync
- name: trouter
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
id: setup-python
with:
python-version-file: .python-version
cache: pipenv
- name: Install python packages
uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
with:
python-version: ${{ steps.setup-python.outputs.python-version }}
- name: Install and cache ansible galaxy dependencies
uses: ./.github/actions/galaxy
with:
cache-name: enterprise
- name: Setup workspace
uses: ./.github/actions/setup-workspace
- name: Run tests
env:
MOLECULE_ROLE_IMAGE: ${{ matrix.molecule_distro.image }}
NEXUS_USERNAME: ${{ secrets.nexus_username }}
NEXUS_PASSWORD: ${{ secrets.nexus_password }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 60
max_attempts: 3
retry_wait_seconds: 10
command: cd roles/${{ matrix.role.name }} && pipenv run molecule test
docker_integration:
name: ${{ matrix.scenario.name }} on ${{ matrix.molecule_distro.image }}
if: github.actor != 'dependabot[bot]'
needs:
- docker
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
molecule_distro:
- image: ubuntu:20.04
- image: ubuntu:22.04
- image: rockylinux:8.7
scenario:
- name: elasticsearch
- name: pki
include:
- scenario:
name: identity
molecule_distro:
image: rockylinux:8.7
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# avoid auth conflict when cloning DTAS during verify step
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v4
id: setup-python
with:
python-version-file: '.python-version'
cache: pipenv
- name: Install python packages
uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
with:
python-version: ${{ steps.setup-python.outputs.python-version }}
- name: Install and cache ansible galaxy dependencies
uses: ./.github/actions/galaxy
with:
cache-name: enterprise
- name: Setup workspace
uses: ./.github/actions/setup-workspace
- name: Run tests
env:
MOLECULE_ROLE_IMAGE: ${{ matrix.molecule_distro.image }}
NEXUS_USERNAME: ${{ secrets.nexus_username }}
NEXUS_PASSWORD: ${{ secrets.nexus_password }}
CLONE_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
run: pipenv run molecule test -s ${{ matrix.scenario.name }}
ec2:
name: ${{ matrix.molecule_scenario.desc }}
if: github.actor != 'dependabot[bot]'
needs:
- docker
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
molecule_scenario:
- name: default
vars: vars-centos7.yml
desc: EC2 ACS 7.0 (Centos7)
- name: default
vars: vars-rhel7.yml
desc: EC2 ACS 7.0 (RHEL7)
- name: default
vars: vars-ubuntu18.yml
desc: EC2 ACS 7.1 (Ubuntu 18.04)
- name: default
vars: vars-rhel8.yml
desc: EC2 ACS 7.1 (RHEL8)
- name: default
vars: vars-ubuntu20-72.yml
desc: EC2 ACS 7.2 (Ubuntu 20.04)
- name: default
vars: vars-ubuntu20-73.yml
desc: EC2 ACS 7.3 (Ubuntu 20.04)
- name: default
vars: vars-ubuntu22-community.yml
desc: EC2 ACS 7.4 Community (Ubuntu 22.04)
- name: default
vars: vars-rocky8.yml
desc: EC2 ACS 7.4 (Rocky Linux 8)
- name: multimachine
vars: vars.yml
desc: EC2 ACS 7.4 clustered (RHEL 8.7)
- name: opensearch
vars: vars.yml
desc: EC2 ACS 7.4 opensearch (RHEL8)
env:
AWS_REGION: eu-west-1
MOLECULE_IT_AWS_VPC_SUBNET_ID: subnet-6bdd4223
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# avoid auth conflict when cloning DTAS during verify step
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v4
id: setup-python
with:
python-version-file: '.python-version'
cache: pipenv
- name: Install python packages
uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
with:
python-version: ${{ steps.setup-python.outputs.python-version }}
- name: Install and cache ansible galaxy dependencies
uses: ./.github/actions/galaxy
with:
cache-name: enterprise
- name: Set BRANCH_NAME
uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
with:
sanitize: true
max-length: 20
- name: Setup workspace
uses: ./.github/actions/setup-workspace
- name: Generate unique id
run: echo "MOLECULE_IT_ID=$(date +%s%4N)" >> $GITHUB_ENV
- name: Set nexus credentials only when required
if: ${{ ! contains( matrix.molecule_scenario.desc, 'community' ) }}
run: |
echo "NEXUS_USERNAME=${{ secrets.nexus_username }}" >> $GITHUB_ENV
echo "NEXUS_PASSWORD=${{ secrets.nexus_password }}" >> $GITHUB_ENV
- name: Run tests
timeout-minutes: 120
env:
MOLECULE_IT_SCENARIO: ${{ matrix.molecule_scenario.name }}
MOLECULE_IT_CONFIG: ${{ matrix.molecule_scenario.vars }}
AWS_ACCESS_KEY_ID: ${{ secrets.aws_access_key_id }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.aws_secret_access_key }}
CLONE_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
run: ./tests/molecule_it/script.sh verify
- name: Cleanup tests
if: always()
timeout-minutes: 65
env:
MOLECULE_IT_SCENARIO: ${{ matrix.molecule_scenario.name }}
MOLECULE_IT_CONFIG: ${{ matrix.molecule_scenario.vars }}
AWS_ACCESS_KEY_ID: ${{ secrets.aws_access_key_id }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.aws_secret_access_key }}
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
retry_wait_seconds: 60
command: ./tests/molecule_it/script.sh destroy