Skip to content

Commit 4191589

Browse files
committed
syncing from "puppetlabs/support_workflows"
1 parent 2a84a31 commit 4191589

File tree

2 files changed

+18
-152
lines changed

2 files changed

+18
-152
lines changed

.github/workflows/pe_latest_testing.yml

Lines changed: 8 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ on:
44
workflow_dispatch:
55
workflow_call:
66

7-
env:
8-
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
9-
HONEYCOMB_DATASET: litmus tests
10-
117
jobs:
128
setup_matrix:
139
name: "Setup Test Matrix"
@@ -16,17 +12,6 @@ jobs:
1612
matrix: ${{ steps.get-matrix.outputs.matrix }}
1713

1814
steps:
19-
- name: "Honeycomb: Start recording"
20-
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
21-
with:
22-
apikey: ${{ env.HONEYCOMB_WRITEKEY }}
23-
dataset: ${{ env.HONEYCOMB_DATASET }}
24-
job-status: ${{ job.status }}
25-
26-
- name: "Honeycomb: Start first step"
27-
run: |
28-
echo STEP_ID=setup-environment >> $GITHUB_ENV
29-
echo STEP_START=$(date +%s) >> $GITHUB_ENV
3015
- name: Checkout Source
3116
uses: actions/checkout@v2
3217
if: ${{ github.repository_owner == 'puppetlabs' }}
@@ -42,14 +27,8 @@ jobs:
4227
if: ${{ github.repository_owner == 'puppetlabs' }}
4328
run: |
4429
echo ::group::bundler environment
45-
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
30+
bundle env
4631
echo ::endgroup::
47-
- name: "Honeycomb: Record Setup Environment time"
48-
if: ${{ github.repository_owner == 'puppetlabs' }}
49-
run: |
50-
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
51-
echo STEP_ID=Setup-Acceptance-Test-Matrix >> $GITHUB_ENV
52-
echo STEP_START=$(date +%s) >> $GITHUB_ENV
5332
5433
# store the result of the curl call in $forge_response
5534
- name: Curl Forge for PE versions
@@ -73,11 +52,6 @@ jobs:
7352
echo "::set-output name=matris::{}"
7453
fi
7554
76-
- name: "Honeycomb: Record Setup Test Matrix time"
77-
if: ${{ always() }}
78-
run: |
79-
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Test Matrix'
80-
8155
Acceptance:
8256
name: "${{matrix.platforms.label}}, ${{matrix.collection}}"
8357
needs:
@@ -89,26 +63,7 @@ jobs:
8963
fail-fast: false
9064
matrix: ${{fromJson(needs.setup_matrix.outputs.matrix)}}
9165

92-
env:
93-
BUILDEVENT_FILE: '../buildevents.txt'
94-
9566
steps:
96-
- run: |
97-
echo 'platform=${{ matrix.platforms.image }}' >> $BUILDEVENT_FILE
98-
echo 'collection=${{ matrix.collection }}' >> $BUILDEVENT_FILE
99-
echo 'label=${{ matrix.platforms.label }}' >> $BUILDEVENT_FILE
100-
- name: "Honeycomb: Start recording"
101-
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
102-
with:
103-
apikey: ${{ env.HONEYCOMB_WRITEKEY }}
104-
dataset: ${{ env.HONEYCOMB_DATASET }}
105-
job-status: ${{ job.status }}
106-
matrix-key: ${{ matrix.platforms.label }}-${{ matrix.collection }}
107-
108-
- name: "Honeycomb: start first step"
109-
run: |
110-
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-1 >> $GITHUB_ENV
111-
echo STEP_START=$(date +%s) >> $GITHUB_ENV
11267
- name: Checkout Source
11368
uses: actions/checkout@v2
11469

@@ -117,21 +72,15 @@ jobs:
11772
with:
11873
ruby-version: "2.7"
11974
bundler-cache: true
120-
12175
- name: Print bundle environment
12276
run: |
12377
echo ::group::bundler environment
124-
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
78+
bundle env
12579
echo ::endgroup::
126-
- name: "Honeycomb: Record Setup Environment time"
127-
if: ${{ always() }}
128-
run: |
129-
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
130-
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-2 >> $GITHUB_ENV
131-
echo STEP_START=$(date +%s) >> $GITHUB_ENV
80+
13281
- name: Provision test environment
13382
run: |
134-
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:provision ${{ matrix.platforms.image }}' -- bundle exec rake 'litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }}]'
83+
bundle exec rake 'litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }}]'
13584
echo ::group::=== REQUEST ===
13685
cat request.json || true
13786
echo
@@ -149,40 +98,22 @@ jobs:
14998
echo INVENTORY_PATH=$FILE >> $GITHUB_ENV
15099
- name: Install PE
151100
run: |
152-
buildevents cmd $TRACE_ID $STEP_ID 'rake deploy_pe::provision_master' -- bundle exec bolt --tmpdir /tmp --log-level debug --modulepath spec/fixtures/modules -i ./$INVENTORY_PATH plan run deploy_pe::provision_master --params '{"version":"${{ matrix.collection }}","pe_settings":{"password":"puppetlabs", "configure_tuning": false}}' --targets all --stream
101+
bundle exec bolt --tmpdir /tmp --log-level debug --modulepath spec/fixtures/modules -i ./$INVENTORY_PATH plan run deploy_pe::provision_master --params '{"version":"${{ matrix.collection }}","pe_settings":{"password":"puppetlabs", "configure_tuning": false}}' --targets all --stream
153102
154103
- name: Install module
155104
run: |
156-
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:install_module' -- bundle exec rake 'litmus:install_module'
157-
- name: "Honeycomb: Record deployment times"
158-
if: ${{ always() }}
159-
run: |
160-
echo ::group::honeycomb step
161-
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Deploy test system'
162-
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-3 >> $GITHUB_ENV
163-
echo STEP_START=$(date +%s) >> $GITHUB_ENV
164-
echo ::endgroup::
105+
bundle exec rake 'litmus:install_module'
165106
- name: Run acceptance tests
166107
run: |
167-
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:acceptance:parallel' -- bundle exec rake 'litmus:acceptance:parallel'
168-
- name: "Honeycomb: Record acceptance testing times"
169-
if: ${{ always() }}
170-
run: |
171-
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Run acceptance tests'
172-
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-4 >> $GITHUB_ENV
173-
echo STEP_START=$(date +%s) >> $GITHUB_ENV
108+
bundle exec rake 'litmus:acceptance:parallel'
174109
- name: Remove test environment
175110
if: ${{ always() }}
176111
continue-on-error: true
177112
run: |
178113
if [[ -f inventory.yaml || -f spec/fixtures/litmus_inventory.yaml ]]; then
179-
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:tear_down' -- bundle exec rake 'litmus:tear_down'
114+
bundle exec rake 'litmus:tear_down'
180115
echo ::group::=== REQUEST ===
181116
cat request.json || true
182117
echo
183118
echo ::endgroup::
184119
fi
185-
- name: "Honeycomb: Record removal times"
186-
if: ${{ always() }}
187-
run: |
188-
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Remove test environment'

.github/workflows/pe_lts_testing.yml

Lines changed: 10 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ on:
44
workflow_dispatch:
55
workflow_call:
66

7-
env:
8-
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
9-
HONEYCOMB_DATASET: litmus tests
10-
117
jobs:
128
setup_matrix:
139
name: "Setup Test Matrix"
@@ -16,17 +12,6 @@ jobs:
1612
matrix: ${{ steps.get-matrix.outputs.matrix }}
1713

1814
steps:
19-
- name: "Honeycomb: Start recording"
20-
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
21-
with:
22-
apikey: ${{ env.HONEYCOMB_WRITEKEY }}
23-
dataset: ${{ env.HONEYCOMB_DATASET }}
24-
job-status: ${{ job.status }}
25-
26-
- name: "Honeycomb: Start first step"
27-
run: |
28-
echo STEP_ID=setup-environment >> $GITHUB_ENV
29-
echo STEP_START=$(date +%s) >> $GITHUB_ENV
3015
- name: Checkout Source
3116
uses: actions/checkout@v2
3217
if: ${{ github.repository_owner == 'puppetlabs' }}
@@ -42,14 +27,8 @@ jobs:
4227
if: ${{ github.repository_owner == 'puppetlabs' }}
4328
run: |
4429
echo ::group::bundler environment
45-
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
30+
bundle env
4631
echo ::endgroup::
47-
- name: "Honeycomb: Record Setup Environment time"
48-
if: ${{ github.repository_owner == 'puppetlabs' }}
49-
run: |
50-
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
51-
echo STEP_ID=Setup-Acceptance-Test-Matrix >> $GITHUB_ENV
52-
echo STEP_START=$(date +%s) >> $GITHUB_ENV
5332
5433
# Store the result of the curl call in $forge_response
5534
- name: Curl Forge for PE versions
@@ -73,10 +52,6 @@ jobs:
7352
echo "::set-output name=matris::{}"
7453
fi
7554
76-
- name: "Honeycomb: Record Setup Test Matrix time"
77-
if: ${{ always() }}
78-
run: |
79-
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Test Matrix'
8055
8156
Acceptance:
8257
name: "${{matrix.platforms.label}}, ${{matrix.collection}}"
@@ -89,26 +64,7 @@ jobs:
8964
fail-fast: false
9065
matrix: ${{fromJson(needs.setup_matrix.outputs.matrix)}}
9166

92-
env:
93-
BUILDEVENT_FILE: '../buildevents.txt'
94-
9567
steps:
96-
- run: |
97-
echo 'platform=${{ matrix.platforms.image }}' >> $BUILDEVENT_FILE
98-
echo 'collection=${{ matrix.collection }}' >> $BUILDEVENT_FILE
99-
echo 'label=${{ matrix.platforms.label }}' >> $BUILDEVENT_FILE
100-
- name: "Honeycomb: Start recording"
101-
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
102-
with:
103-
apikey: ${{ env.HONEYCOMB_WRITEKEY }}
104-
dataset: ${{ env.HONEYCOMB_DATASET }}
105-
job-status: ${{ job.status }}
106-
matrix-key: ${{ matrix.platforms.label }}-${{ matrix.collection }}
107-
108-
- name: "Honeycomb: start first step"
109-
run: |
110-
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-1 >> $GITHUB_ENV
111-
echo STEP_START=$(date +%s) >> $GITHUB_ENV
11268
- name: Checkout Source
11369
uses: actions/checkout@v2
11470

@@ -121,17 +77,12 @@ jobs:
12177
- name: Print bundle environment
12278
run: |
12379
echo ::group::bundler environment
124-
buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
80+
bundle env
12581
echo ::endgroup::
126-
- name: "Honeycomb: Record Setup Environment time"
127-
if: ${{ always() }}
128-
run: |
129-
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
130-
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-2 >> $GITHUB_ENV
131-
echo STEP_START=$(date +%s) >> $GITHUB_ENV
82+
13283
- name: Provision test environment
13384
run: |
134-
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:provision ${{ matrix.platforms.image }}' -- bundle exec rake 'litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }}]'
85+
bundle exec rake 'litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }}]'
13586
echo ::group::=== REQUEST ===
13687
cat request.json || true
13788
echo
@@ -149,40 +100,24 @@ jobs:
149100
echo INVENTORY_PATH=$FILE >> $GITHUB_ENV
150101
- name: Install PE
151102
run: |
152-
buildevents cmd $TRACE_ID $STEP_ID 'rake deploy_pe::provision_master' -- bundle exec bolt --tmpdir /tmp --log-level debug --modulepath spec/fixtures/modules -i ./$INVENTORY_PATH plan run deploy_pe::provision_master --params '{"version":"${{ matrix.collection }}","pe_settings":{"password":"puppetlabs", "configure_tuning": false}}' --targets all --stream
103+
bundle exec bolt --tmpdir /tmp --log-level debug --modulepath spec/fixtures/modules -i ./$INVENTORY_PATH plan run deploy_pe::provision_master --params '{"version":"${{ matrix.collection }}","pe_settings":{"password":"puppetlabs", "configure_tuning": false}}' --targets all --stream
153104
154105
- name: Install module
155106
run: |
156-
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:install_module' -- bundle exec rake 'litmus:install_module'
157-
- name: "Honeycomb: Record deployment times"
158-
if: ${{ always() }}
159-
run: |
160-
echo ::group::honeycomb step
161-
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Deploy test system'
162-
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-3 >> $GITHUB_ENV
163-
echo STEP_START=$(date +%s) >> $GITHUB_ENV
164-
echo ::endgroup::
107+
bundle exec rake 'litmus:install_module'
108+
165109
- name: Run acceptance tests
166110
run: |
167-
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:acceptance:parallel' -- bundle exec rake 'litmus:acceptance:parallel'
168-
- name: "Honeycomb: Record acceptance testing times"
169-
if: ${{ always() }}
170-
run: |
171-
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Run acceptance tests'
172-
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-4 >> $GITHUB_ENV
173-
echo STEP_START=$(date +%s) >> $GITHUB_ENV
111+
bundle exec rake 'litmus:acceptance:parallel'
174112
- name: Remove test environment
175113
if: ${{ always() }}
176114
continue-on-error: true
177115
run: |
178116
if [[ -f inventory.yaml || -f spec/fixtures/litmus_inventory.yaml ]]; then
179-
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:tear_down' -- bundle exec rake 'litmus:tear_down'
117+
bundle exec rake 'litmus:tear_down'
180118
echo ::group::=== REQUEST ===
181119
cat request.json || true
182120
echo
183121
echo ::endgroup::
184122
fi
185-
- name: "Honeycomb: Record removal times"
186-
if: ${{ always() }}
187-
run: |
188-
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Remove test environment'
123+

0 commit comments

Comments
 (0)