2727 run : |
2828 echo STEP_ID=setup-environment >> $GITHUB_ENV
2929 echo STEP_START=$(date +%s) >> $GITHUB_ENV
30-
3130 - name : Checkout Source
3231 uses : actions/checkout@v2
3332 if : ${{ github.repository_owner == 'puppetlabs' }}
@@ -45,32 +44,28 @@ jobs:
4544 echo ::group::bundler environment
4645 buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
4746 echo ::endgroup::
48-
4947 - name : " Honeycomb: Record Setup Environment time"
5048 if : ${{ github.repository_owner == 'puppetlabs' }}
5149 run : |
5250 buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
53- echo STEP_ID=Setup-Acceptance -Test-Matrix >> $GITHUB_ENV
51+ echo STEP_ID=Setup-Integration -Test-Matrix >> $GITHUB_ENV
5452 echo STEP_START=$(date +%s) >> $GITHUB_ENV
55-
56- - name : Setup Acceptance Test Matrix
53+ - name : Setup Integration Test Matrix
5754 id : get-matrix
58- if : ${{ github.repository_owner == 'puppetlabs' }}
5955 run : |
6056 if [ '${{ github.repository_owner }}' == 'puppetlabs' ]; then
61- buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata
57+ echo "::set-output name=matrix::{'platform':['centos-7'],'collection':['puppet6-nightly', 'puppet7-nightly']}"
6258 else
6359 echo "::set-output name=matrix::{}"
6460 fi
65-
6661 - name : " Honeycomb: Record Setup Test Matrix time"
6762 if : ${{ always() }}
6863 run : |
6964 buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Test Matrix'
70-
71- Acceptance :
65+ Integration :
7266 needs :
7367 - setup_matrix
68+ if : ${{ needs.setup_matrix.outputs.matrix != '{}' }}
7469
7570 runs-on : ubuntu-20.04
7671 strategy :
8479 - run : |
8580 echo 'platform=${{ matrix.platform }}' >> $BUILDEVENT_FILE
8681 echo 'collection=${{ matrix.collection }}' >> $BUILDEVENT_FILE
87-
8882 - name : " Honeycomb: Start recording"
8983 uses : puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
9084 with :
9791 run : |
9892 echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-1 >> $GITHUB_ENV
9993 echo STEP_START=$(date +%s) >> $GITHUB_ENV
100-
10194 - name : Checkout Source
10295 uses : actions/checkout@v2
10396
@@ -112,33 +105,41 @@ jobs:
112105 echo ::group::bundler environment
113106 buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
114107 echo ::endgroup::
115-
108+ - name : Create the fixtures directory
109+ run : |
110+ echo ::group::Create the fixtures directory
111+ buildevents cmd $TRACE_ID $STEP_ID 'bundle exec rake spec_prep' -- bundle exec rake spec_prep
112+ echo ::endgroup::
116113 - name : " Honeycomb: Record Setup Environment time"
117114 if : ${{ always() }}
118115 run : |
119116 buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
120117 echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-2 >> $GITHUB_ENV
121118 echo STEP_START=$(date +%s) >> $GITHUB_ENV
122-
123119 - name : Provision test environment
124120 run : |
125- buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:provision ${{ matrix.platform }} ' -- bundle exec rake 'litmus:provision[provision::provision_service, ${{ matrix.platform }}]'
121+ buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:provision' -- bundle exec bolt --modulepath spec/fixtures/modules plan run kubernetes::provision_gcp gcp_image= ${{ matrix.platform }}
126122 echo ::group::=== REQUEST ===
127123 cat request.json || true
128124 echo
129125 echo ::endgroup::
130126 echo ::group::=== INVENTORY ===
131127 sed -e 's/password: .*/password: "[redacted]"/' < inventory.yaml || true
132128 echo ::endgroup::
133-
134- - name : Install agent
129+ - name : Install module
135130 run : |
136- buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:install_agent ${{ matrix.collection }}' -- bundle exec rake 'litmus:install_agent[${{ matrix.collection }}]'
131+ buildevents cmd $TRACE_ID $STEP_ID 'rake kubernetes::puppetserver_setup' -- bundle exec bolt --modulepath spec/fixtures/modules plan run kubernetes::puppetserver_setup -i ./inventory.yaml
132+ - name : Install agent
133+ uses : nick-invision/retry@v1
134+ with :
135+ timeout_minutes : 30
136+ max_attempts : 5
137+ retry_wait_seconds : 60
138+ command : buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:install_agent ${{ matrix.collection }}' -- bundle exec rake 'litmus:install_agent[${{ matrix.collection }}]'
137139
138140 - name : Install module
139141 run : |
140142 buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:install_module' -- bundle exec rake 'litmus:install_module'
141-
142143 - name : " Honeycomb: Record deployment times"
143144 if : ${{ always() }}
144145 run : |
@@ -148,17 +149,15 @@ jobs:
148149 echo STEP_START=$(date +%s) >> $GITHUB_ENV
149150 echo ::endgroup::
150151
151- - name : Run acceptance tests
152+ - name : Run integration tests
152153 run : |
153- buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:acceptance:parallel' -- bundle exec rake 'litmus:acceptance:parallel'
154-
155- - name : " Honeycomb: Record acceptance testing times"
154+ buildevents cmd $TRACE_ID $STEP_ID 'rake kubernetes:integration' -- bundle exec rake kubernetes:integration
155+ - name : " Honeycomb: Record integration testing times"
156156 if : ${{ always() }}
157157 run : |
158- buildevents step $TRACE_ID $STEP_ID $STEP_START 'Run acceptance tests'
158+ buildevents step $TRACE_ID $STEP_ID $STEP_START 'Run integration tests'
159159 echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-4 >> $GITHUB_ENV
160160 echo STEP_START=$(date +%s) >> $GITHUB_ENV
161-
162161 - name : Remove test environment
163162 if : ${{ always() }}
164163 continue-on-error : true
@@ -170,7 +169,6 @@ jobs:
170169 echo
171170 echo ::endgroup::
172171 fi
173-
174172 - name : " Honeycomb: Record removal times"
175173 if : ${{ always() }}
176174 run : |
0 commit comments