6 HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
7 HONEYCOMB_DATASET: litmus tests
11 name: "Setup Test Matrix"
14 matrix: ${{ steps.get-matrix.outputs.matrix }}
17 - name: "Honeycomb: Start recording"
18 uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
20 apikey: ${{ env.HONEYCOMB_WRITEKEY }}
21 dataset: ${{ env.HONEYCOMB_DATASET }}
22 job-status: ${{ job.status }}
24 - name: "Honeycomb: Start first step"
26 echo STEP_ID=setup-environment >> $GITHUB_ENV
27 echo STEP_START=$(date +%s) >> $GITHUB_ENV
29 - name: Checkout Source
30 uses: actions/checkout@v2
31 if: ${{ github.repository_owner == 'puppetlabs' }}
33 - name: Activate Ruby 2.7
34 uses: ruby/setup-ruby@v1
35 if: ${{ github.repository_owner == 'puppetlabs' }}
40 - name: Print bundle environment
41 if: ${{ github.repository_owner == 'puppetlabs' }}
43 echo ::group::bundler environment
44 buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
47 - name: "Honeycomb: Record Setup Environment time"
48 if: ${{ github.repository_owner == 'puppetlabs' }}
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
54 - name: Setup Acceptance Test Matrix
57 if [ '${{ github.repository_owner }}' == 'puppetlabs' ]; then
58 buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata_v2
60 echo "::set-output name=matrix::{}"
63 - name: "Honeycomb: Record Setup Test Matrix time"
66 buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Test Matrix'
69 name: "${{matrix.platforms.label}}, ${{matrix.collection}}"
72 if: ${{ needs.setup_matrix.outputs.matrix != '{}' }}
77 matrix: ${{fromJson(needs.setup_matrix.outputs.matrix)}}
80 BUILDEVENT_FILE: '../buildevents.txt'
84 echo 'platform=${{ matrix.platforms.image }}' >> $BUILDEVENT_FILE
85 echo 'collection=${{ matrix.collection }}' >> $BUILDEVENT_FILE
86 echo 'label=${{ matrix.platforms.label }}' >> $BUILDEVENT_FILE
88 - name: "Honeycomb: Start recording"
89 uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
91 apikey: ${{ env.HONEYCOMB_WRITEKEY }}
92 dataset: ${{ env.HONEYCOMB_DATASET }}
93 job-status: ${{ job.status }}
94 matrix-key: ${{ matrix.platforms.label }}-${{ matrix.collection }}
96 - name: "Honeycomb: start first step"
98 echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-1 >> $GITHUB_ENV
99 echo STEP_START=$(date +%s) >> $GITHUB_ENV
101 - name: Checkout Source
102 uses: actions/checkout@v2
104 - name: Activate Ruby 2.7
105 uses: ruby/setup-ruby@v1
110 - name: Print bundle environment
112 echo ::group::bundler environment
113 buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
116 - name: "Honeycomb: Record Setup Environment time"
119 buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
120 echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-2 >> $GITHUB_ENV
121 echo STEP_START=$(date +%s) >> $GITHUB_ENV
123 - name: Provision test environment
125 buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:provision ${{ matrix.platforms.image }}' -- bundle exec rake 'litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }}]'
126 echo ::group::=== REQUEST ===
127 cat request.json || true
130 echo ::group::=== INVENTORY ===
131 sed -e 's/password: .*/password: "[redacted]"/' < inventory.yaml || true
134 - name: Install agent
136 buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:install_agent ${{ matrix.collection }}' -- bundle exec rake 'litmus:install_agent[${{ matrix.collection }}]'
138 - name: Install module
140 buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:install_module' -- bundle exec rake 'litmus:install_module'
142 - name: "Honeycomb: Record deployment times"
145 echo ::group::honeycomb step
146 buildevents step $TRACE_ID $STEP_ID $STEP_START 'Deploy test system'
147 echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-3 >> $GITHUB_ENV
148 echo STEP_START=$(date +%s) >> $GITHUB_ENV
151 - name: Run acceptance tests
153 buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:acceptance:parallel' -- bundle exec rake 'litmus:acceptance:parallel'
155 - name: "Honeycomb: Record acceptance testing times"
158 buildevents step $TRACE_ID $STEP_ID $STEP_START 'Run acceptance tests'
159 echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-4 >> $GITHUB_ENV
160 echo STEP_START=$(date +%s) >> $GITHUB_ENV
162 - name: Remove test environment
164 continue-on-error: true
166 if [ -f inventory.yaml ]; then
167 buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:tear_down' -- bundle exec rake 'litmus:tear_down'
168 echo ::group::=== REQUEST ===
169 cat request.json || true
174 - name: "Honeycomb: Record removal times"
177 buildevents step $TRACE_ID $STEP_ID $STEP_START 'Remove test environment'