@@ -17,62 +17,59 @@ jobs:
17
17
18
18
steps :
19
19
- name : " Honeycomb: Start recording"
20
- uses :
kvrhdn/ gha-buildevents@5be4636b81803713c94d7cb7e3a4b85d759df112 # [email protected]
20
+ uses : puppetlabs/kvrhdn- gha-buildevents@pdk-templates-v1
21
21
with :
22
22
apikey : ${{ env.HONEYCOMB_WRITEKEY }}
23
23
dataset : ${{ env.HONEYCOMB_DATASET }}
24
24
job-status : ${{ job.status }}
25
25
26
26
- name : " Honeycomb: Start first step"
27
27
run : |
28
- echo STEP_ID=0 >> $GITHUB_ENV
28
+ echo STEP_ID=setup-environment >> $GITHUB_ENV
29
29
echo STEP_START=$(date +%s) >> $GITHUB_ENV
30
30
31
31
- name : Checkout Source
32
32
uses : actions/checkout@v2
33
33
if : ${{ github.repository_owner == 'puppetlabs' }}
34
34
35
35
- name : Activate Ruby 2.7
36
- uses : actions /setup-ruby@v1
36
+ uses : ruby /setup-ruby@v1
37
37
if : ${{ github.repository_owner == 'puppetlabs' }}
38
38
with :
39
39
ruby-version : " 2.7"
40
+ bundler-cache : true
40
41
41
- - name : Cache gems
42
- uses : actions/cache@v2
42
+ - name : Print bundle environment
43
43
if : ${{ github.repository_owner == 'puppetlabs' }}
44
- with :
45
- path : vendor/gems
46
- key : ${{ runner.os }}-${{ github.event_name }}-${{ hashFiles('**/Gemfile') }}
47
- restore-keys : |
48
- ${{ runner.os }}-${{ github.event_name }}-
49
- ${{ runner.os }}-
44
+ run : |
45
+ echo ::group::bundler environment
46
+ buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
47
+ echo ::endgroup::
50
48
51
- - name : Install gems
49
+ - name : " Honeycomb: Record Setup Environment time "
52
50
if : ${{ github.repository_owner == 'puppetlabs' }}
53
51
run : |
54
- buildevents cmd $TRACE_ID $STEP_ID 'bundle config path vendor/gems' -- bundle config path vendor/gems
55
- buildevents cmd $TRACE_ID $STEP_ID 'bundle config jobs 8' -- bundle config jobs 8
56
- buildevents cmd $TRACE_ID $STEP_ID 'bundle config retry 3' -- bundle config retry 3
57
- buildevents cmd $TRACE_ID $STEP_ID 'bundle install' -- bundle install
58
- buildevents cmd $TRACE_ID $STEP_ID 'bundle clean' -- bundle clean
52
+ buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
53
+ echo STEP_ID=Setup-Acceptance-Test-Matrix >> $GITHUB_ENV
54
+ echo STEP_START=$(date +%s) >> $GITHUB_ENV
59
55
60
56
- name : Setup Acceptance Test Matrix
61
57
id : get-matrix
62
58
if : ${{ github.repository_owner == 'puppetlabs' }}
63
59
run : |
64
60
if [ '${{ github.repository_owner }}' == 'puppetlabs' ]; then
65
- buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata
61
+ buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata_v2
66
62
else
67
63
echo "::set-output name=matrix::{}"
68
64
fi
69
65
70
- - name : " Honeycomb: Record setup time"
66
+ - name : " Honeycomb: Record Setup Test Matrix time"
71
67
if : ${{ always() }}
72
68
run : |
73
69
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Test Matrix'
74
70
75
71
Acceptance :
72
+ name : " ${{matrix.platforms.label}}, ${{matrix.collection}}"
76
73
needs :
77
74
- setup_matrix
78
75
@@ -86,67 +83,49 @@ jobs:
86
83
87
84
steps :
88
85
- run : |
89
- echo 'platform=${{ matrix.platform }}' >> $BUILDEVENT_FILE
86
+ echo 'platform=${{ matrix.platforms.image }}' >> $BUILDEVENT_FILE
90
87
echo 'collection=${{ matrix.collection }}' >> $BUILDEVENT_FILE
88
+ echo 'label=${{ matrix.platforms.label }}' >> $BUILDEVENT_FILE
89
+
91
90
92
91
- name : " Honeycomb: Start recording"
93
- uses :
kvrhdn/ gha-buildevents@5be4636b81803713c94d7cb7e3a4b85d759df112 # [email protected]
92
+ uses : puppetlabs/kvrhdn- gha-buildevents@pdk-templates-v1
94
93
with :
95
94
apikey : ${{ env.HONEYCOMB_WRITEKEY }}
96
95
dataset : ${{ env.HONEYCOMB_DATASET }}
97
96
job-status : ${{ job.status }}
98
- matrix-key : ${{ matrix.platform }}-${{ matrix.collection }}
97
+ matrix-key : ${{ matrix.platforms.label }}-${{ matrix.collection }}
99
98
100
99
- name : " Honeycomb: start first step"
101
100
run : |
102
- echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-1 >> $GITHUB_ENV
101
+ echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-1 >> $GITHUB_ENV
103
102
echo STEP_START=$(date +%s) >> $GITHUB_ENV
104
103
105
104
- name : Checkout Source
106
105
uses : actions/checkout@v2
107
106
108
107
- name : Activate Ruby 2.7
109
- uses : actions /setup-ruby@v1
108
+ uses : ruby /setup-ruby@v1
110
109
with :
111
110
ruby-version : " 2.7"
111
+ bundler-cache : true
112
112
113
- - name : Cache gems
114
- uses : actions/cache@v2
115
- with :
116
- path : vendor/gems
117
- key : ${{ runner.os }}-${{ github.event_name }}-${{ hashFiles('**/Gemfile') }}
118
- restore-keys : |
119
- ${{ runner.os }}-${{ github.event_name }}-
120
- ${{ runner.os }}-
121
-
122
- - name : " Honeycomb: Record cache setup time"
123
- if : ${{ always() }}
124
- run : |
125
- buildevents step $TRACE_ID $STEP_ID $STEP_START 'Cache retrieval'
126
- echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-2 >> $GITHUB_ENV
127
- echo STEP_START=$(date +%s) >> $GITHUB_ENV
128
-
129
- - name : Bundler Setup
113
+ - name : Print bundle environment
130
114
run : |
131
- buildevents cmd $TRACE_ID $STEP_ID 'bundle config path vendor/gems' -- bundle config path vendor/gems
132
- buildevents cmd $TRACE_ID $STEP_ID 'bundle config jobs 8' -- bundle config jobs 8
133
- buildevents cmd $TRACE_ID $STEP_ID 'bundle config retry 3' -- bundle config retry 3
134
- buildevents cmd $TRACE_ID $STEP_ID 'bundle install' -- bundle install
135
- buildevents cmd $TRACE_ID $STEP_ID 'bundle clean' -- bundle clean
136
115
echo ::group::bundler environment
137
116
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
138
117
echo ::endgroup::
139
118
140
- - name : " Honeycomb: Record Bundler Setup time"
119
+ - name : " Honeycomb: Record Setup Environment time"
141
120
if : ${{ always() }}
142
121
run : |
143
- buildevents step $TRACE_ID $STEP_ID $STEP_START 'Bundler Setup'
144
- echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-3 >> $GITHUB_ENV
122
+ buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment '
123
+ echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-2 >> $GITHUB_ENV
145
124
echo STEP_START=$(date +%s) >> $GITHUB_ENV
146
125
147
126
- name : Provision test environment
148
127
run : |
149
- buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:provision ${{ matrix.platform }}' -- bundle exec rake 'litmus:provision[provision::provision_service ,${{ matrix.platform }}]'
128
+ buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:provision ${{ matrix.platforms.image }}' -- bundle exec rake 'litmus:provision[${{matrix.platforms.provider}} ,${{ matrix.platforms.image }}]'
150
129
echo ::group::=== REQUEST ===
151
130
cat request.json || true
152
131
echo
@@ -168,7 +147,7 @@ jobs:
168
147
run : |
169
148
echo ::group::honeycomb step
170
149
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Deploy test system'
171
- echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-4 >> $GITHUB_ENV
150
+ echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-3 >> $GITHUB_ENV
172
151
echo STEP_START=$(date +%s) >> $GITHUB_ENV
173
152
echo ::endgroup::
174
153
@@ -180,11 +159,12 @@ jobs:
180
159
if : ${{ always() }}
181
160
run : |
182
161
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Run acceptance tests'
183
- echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-5 >> $GITHUB_ENV
162
+ echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-4 >> $GITHUB_ENV
184
163
echo STEP_START=$(date +%s) >> $GITHUB_ENV
185
164
186
165
- name : Remove test environment
187
166
if : ${{ always() }}
167
+ continue-on-error : true
188
168
run : |
189
169
if [ -f inventory.yaml ]; then
190
170
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:tear_down' -- bundle exec rake 'litmus:tear_down'
@@ -207,7 +187,7 @@ jobs:
207
187
runs-on : ubuntu-20.04
208
188
steps :
209
189
- name : Slack Workflow Notification
210
- uses : Gamesight/ slack-workflow-status@88ee95b73b4669825883ddf22747966204663e58 # pin@master
190
+ uses : puppetlabs/Gamesight- slack-workflow-status@pdk-templates-v1
211
191
with :
212
192
# Required Input
213
193
repo_token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments