1- name : " PR Testing"
1+ name : " Integration Testing"
22
33on : [pull_request]
44
2525 run : |
2626 echo STEP_ID=setup-environment >> $GITHUB_ENV
2727 echo STEP_START=$(date +%s) >> $GITHUB_ENV
28-
2928 - name : Checkout Source
3029 uses : actions/checkout@v2
3130 if : ${{ github.repository_owner == 'puppetlabs' }}
@@ -43,29 +42,25 @@ jobs:
4342 echo ::group::bundler environment
4443 buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
4544 echo ::endgroup::
46-
4745 - name : " Honeycomb: Record Setup Environment time"
4846 if : ${{ github.repository_owner == 'puppetlabs' }}
4947 run : |
5048 buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
51- echo STEP_ID=Setup-Acceptance -Test-Matrix >> $GITHUB_ENV
49+ echo STEP_ID=Setup-Integration -Test-Matrix >> $GITHUB_ENV
5250 echo STEP_START=$(date +%s) >> $GITHUB_ENV
53-
54- - name : Setup Acceptance Test Matrix
51+ - name : Setup Integration Test Matrix
5552 id : get-matrix
5653 run : |
5754 if [ '${{ github.repository_owner }}' == 'puppetlabs' ]; then
58- buildevents cmd $TRACE_ID $STEP_ID matrix_from_metadata -- bundle exec matrix_from_metadata
55+ echo "::set-output name=matrix::{'platform':['centos-7'],'collection':['puppet6-nightly', 'puppet7-nightly']}"
5956 else
6057 echo "::set-output name=matrix::{}"
6158 fi
62-
6359 - name : " Honeycomb: Record Setup Test Matrix time"
6460 if : ${{ always() }}
6561 run : |
6662 buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Test Matrix'
67-
68- Acceptance :
63+ Integration :
6964 needs :
7065 - setup_matrix
7166 if : ${{ needs.setup_matrix.outputs.matrix != '{}' }}
8277 - run : |
8378 echo 'platform=${{ matrix.platform }}' >> $BUILDEVENT_FILE
8479 echo 'collection=${{ matrix.collection }}' >> $BUILDEVENT_FILE
85-
8680 - name : " Honeycomb: Start recording"
8781 uses : puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
8882 with :
9589 run : |
9690 echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-1 >> $GITHUB_ENV
9791 echo STEP_START=$(date +%s) >> $GITHUB_ENV
98-
9992 - name : Checkout Source
10093 uses : actions/checkout@v2
10194
@@ -110,33 +103,41 @@ jobs:
110103 echo ::group::bundler environment
111104 buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
112105 echo ::endgroup::
113-
106+ - name : Create the fixtures directory
107+ run : |
108+ echo ::group::Create the fixtures directory
109+ buildevents cmd $TRACE_ID $STEP_ID 'bundle exec rake spec_prep' -- bundle exec rake spec_prep
110+ echo ::endgroup::
114111 - name : " Honeycomb: Record Setup Environment time"
115112 if : ${{ always() }}
116113 run : |
117114 buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
118115 echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-2 >> $GITHUB_ENV
119116 echo STEP_START=$(date +%s) >> $GITHUB_ENV
120-
121117 - name : Provision test environment
122118 run : |
123- buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:provision ${{ matrix.platform }} ' -- bundle exec rake 'litmus:provision[provision::provision_service, ${{ matrix.platform }}]'
119+ buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:provision' -- bundle exec bolt --modulepath spec/fixtures/modules plan run kubernetes::provision_cluster gcp_image= ${{ matrix.platform }}
124120 echo ::group::=== REQUEST ===
125121 cat request.json || true
126122 echo
127123 echo ::endgroup::
128124 echo ::group::=== INVENTORY ===
129125 sed -e 's/password: .*/password: "[redacted]"/' < inventory.yaml || true
130126 echo ::endgroup::
131-
132- - name : Install agent
127+ - name : Puppet server setup
133128 run : |
134- buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:install_agent ${{ matrix.collection }}' -- bundle exec rake 'litmus:install_agent[${{ matrix.collection }}]'
129+ 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
130+ - name : Install agent
131+ uses : nick-invision/retry@v1
132+ with :
133+ timeout_minutes : 30
134+ max_attempts : 5
135+ retry_wait_seconds : 60
136+ command : buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:install_agent ${{ matrix.collection }}' -- bundle exec rake 'litmus:install_agent[${{ matrix.collection }}]'
135137
136138 - name : Install module
137139 run : |
138140 buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:install_module' -- bundle exec rake 'litmus:install_module'
139-
140141 - name : " Honeycomb: Record deployment times"
141142 if : ${{ always() }}
142143 run : |
@@ -146,17 +147,15 @@ jobs:
146147 echo STEP_START=$(date +%s) >> $GITHUB_ENV
147148 echo ::endgroup::
148149
149- - name : Run acceptance tests
150+ - name : Run integration tests
150151 run : |
151- buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:acceptance:parallel' -- bundle exec rake 'litmus:acceptance:parallel'
152-
153- - name : " Honeycomb: Record acceptance testing times"
152+ buildevents cmd $TRACE_ID $STEP_ID 'rake kubernetes:integration' -- bundle exec rake kubernetes:integration
153+ - name : " Honeycomb: Record integration testing times"
154154 if : ${{ always() }}
155155 run : |
156- buildevents step $TRACE_ID $STEP_ID $STEP_START 'Run acceptance tests'
156+ buildevents step $TRACE_ID $STEP_ID $STEP_START 'Run integration tests'
157157 echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-4 >> $GITHUB_ENV
158158 echo STEP_START=$(date +%s) >> $GITHUB_ENV
159-
160159 - name : Remove test environment
161160 if : ${{ always() }}
162161 continue-on-error : true
@@ -168,7 +167,6 @@ jobs:
168167 echo
169168 echo ::endgroup::
170169 fi
171-
172170 - name : " Honeycomb: Record removal times"
173171 if : ${{ always() }}
174172 run : |
0 commit comments