11
11
12
12
jobs :
13
13
setup_matrix :
14
- if : ${{ github.repository_owner == 'puppetlabs' }}
15
14
name : " Setup Test Matrix"
16
15
runs-on : ubuntu-20.04
17
16
outputs :
18
17
matrix : ${{ steps.get-matrix.outputs.matrix }}
19
18
20
19
steps :
21
20
22
- - name : " Connect to twingate"
23
- uses : twingate/github-action@v1
24
- with :
25
- service-key : ${{ secrets.TWINGATE_PUBLIC_REPO_KEY }}
26
-
27
21
- name : " Honeycomb: Start recording"
28
22
uses : puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
29
23
with :
35
29
run : |
36
30
echo STEP_ID=setup-environment >> $GITHUB_ENV
37
31
echo STEP_START=$(date +%s) >> $GITHUB_ENV
32
+
38
33
- name : Checkout Source
39
34
uses : actions/checkout@v2
40
35
if : ${{ github.repository_owner == 'puppetlabs' }}
@@ -52,31 +47,33 @@ jobs:
52
47
echo ::group::bundler environment
53
48
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
54
49
echo ::endgroup::
55
-
50
+
56
51
- name : " Honeycomb: Record Setup Environment time"
57
52
if : ${{ github.repository_owner == 'puppetlabs' }}
58
53
run : |
59
54
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
60
55
echo STEP_ID=Setup-Acceptance-Test-Matrix >> $GITHUB_ENV
61
56
echo STEP_START=$(date +%s) >> $GITHUB_ENV
57
+
62
58
- name : Setup Acceptance Test Matrix
63
59
id : get-matrix
64
- if : ${{ github.repository_owner == 'puppetlabs' }}
65
60
run : |
66
61
if [ '${{ github.repository_owner }}' == 'puppetlabs' ]; then
67
- buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata_v2
62
+ buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata_v2
68
63
else
69
64
echo "::set-output name=matrix::{}"
70
65
fi
71
-
66
+
72
67
- name : " Honeycomb: Record Setup Test Matrix time"
73
68
if : ${{ always() }}
74
69
run : |
75
70
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Test Matrix'
71
+
76
72
Acceptance :
77
73
name : " ${{matrix.platforms.label}}, ${{matrix.collection}}"
78
74
needs :
79
75
- setup_matrix
76
+ if : ${{ needs.setup_matrix.outputs.matrix != '{}' }}
80
77
81
78
runs-on : ubuntu-20.04
82
79
strategy :
92
89
echo 'collection=${{ matrix.collection }}' >> $BUILDEVENT_FILE
93
90
echo 'label=${{ matrix.platforms.label }}' >> $BUILDEVENT_FILE
94
91
95
-
96
92
- name : " Honeycomb: Start recording"
97
93
uses : puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
98
94
with :
@@ -130,7 +126,12 @@ jobs:
130
126
131
127
- name : Provision test environment
132
128
run : |
133
- buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:provision ${{ matrix.platforms.image }}' -- bundle exec rake 'litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }}]'
129
+ if [[ "${{matrix.platforms.provider}}" == "provision::docker" ]]; then
130
+ DOCKER_RUN_OPTS="docker_run_opts: {'--volume': '/lib/modules/$(uname -r):/lib/modules/$(uname -r)'}"
131
+ else
132
+ DOCKER_RUN_OPTS=''
133
+ fi
134
+ buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:provision ${{ matrix.platforms.image }}' -- bundle exec rake "litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }},$DOCKER_RUN_OPTS]"
134
135
echo ::group::=== REQUEST ===
135
136
cat request.json || true
136
137
echo
@@ -154,6 +155,20 @@ jobs:
154
155
run : |
155
156
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:install_module' -- bundle exec rake 'litmus:install_module'
156
157
158
+ - uses : twingate/github-action@v1
159
+ with :
160
+ service-key : ${{ secrets.TWINGATE_PUBLIC_REPO_KEY }}
161
+
162
+ - name : Download OS ISO
163
+ run : |
164
+ bundle exec bolt command run "cd C:\\; Invoke-WebRequest -Uri https://artifactory.delivery.puppetlabs.net/artifactory/generic__iso/iso/windows/en_windows_server_2019_updated_july_2020_x64_dvd_94453821.iso -UseBasicParsing" \
165
+ --targets winrm_nodes --inventoryfile spec/fixtures/litmus_inventory.yaml
166
+
167
+ - name : Download SQLServer ISO
168
+ run : |
169
+ bundle exec bolt command run "cd C:\\; Invoke-WebRequest -Uri https://artifactory.delivery.puppetlabs.net/artifactory/generic__iso/iso/SQLServer/SQLServer2019CTP2.4-x64-ENU.iso -UseBasicParsing" \
170
+ --targets winrm_nodes --inventoryfile spec/fixtures/litmus_inventory.yaml
171
+
157
172
- name : " Honeycomb: Record deployment times"
158
173
if : ${{ always() }}
159
174
run : |
@@ -190,20 +205,3 @@ jobs:
190
205
if : ${{ always() }}
191
206
run : |
192
207
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Remove test environment'
193
-
194
- slack-workflow-status :
195
- if : ${{ github.repository_owner == 'puppetlabs' }}
196
- name : Post Workflow Status To Slack
197
- needs :
198
- - Acceptance
199
- runs-on : ubuntu-20.04
200
- steps :
201
- - name : Slack Workflow Notification
202
- uses : puppetlabs/Gamesight-slack-workflow-status@pdk-templates-v1
203
- with :
204
- # Required Input
205
- repo_token : ${{ secrets.GITHUB_TOKEN }}
206
- slack_webhook_url : ${{ secrets.SLACK_WEBHOOK }}
207
- # Optional Input
208
- channel : ' #team-cat-bots'
209
- name : ' GABot'
0 commit comments