2525 run : |
2626 echo STEP_ID=setup-environment >> $GITHUB_ENV
2727 echo STEP_START=$(date +%s) >> $GITHUB_ENV
28+
2829 - name : Checkout Source
2930 uses : actions/checkout@v2
3031 if : ${{ github.repository_owner == 'puppetlabs' }}
@@ -42,24 +43,28 @@ jobs:
4243 echo ::group::bundler environment
4344 buildevents cmd $TRACE_ID $STEP_ID 'bundle env' -- bundle env
4445 echo ::endgroup::
46+
4547 - name : " Honeycomb: Record Setup Environment time"
4648 if : ${{ github.repository_owner == 'puppetlabs' }}
4749 run : |
4850 buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
4951 echo STEP_ID=Setup-Integration-Test-Matrix >> $GITHUB_ENV
5052 echo STEP_START=$(date +%s) >> $GITHUB_ENV
53+
5154 - name : Setup Integration Test Matrix
5255 id : get-matrix
5356 run : |
5457 if [ '${{ github.repository_owner }}' == 'puppetlabs' ]; then
55- echo "::set-output name=matrix::{'platform':['centos-7'],'collection':['puppet6-nightly', ' puppet7-nightly']}"
58+ echo "::set-output name=matrix::{'platform':['centos-7'],'collection':['puppet7-nightly']}"
5659 else
5760 echo "::set-output name=matrix::{}"
5861 fi
62+
5963 - name : " Honeycomb: Record Setup Test Matrix time"
6064 if : ${{ always() }}
6165 run : |
6266 buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Test Matrix'
67+
6368 Integration :
6469 needs :
6570 - setup_matrix
@@ -116,35 +121,39 @@ jobs:
116121 echo STEP_START=$(date +%s) >> $GITHUB_ENV
117122 - name : Provision test environment
118123 run : |
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 }}
124+ buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:provision' -- bundle exec bolt --modulepath spec/fixtures/modules plan run kubernetes::provision_cluster image_type =${{ matrix.platform }}
120125 echo ::group::=== REQUEST ===
121126 cat request.json || true
122127 echo
123128 echo ::endgroup::
124129 echo ::group::=== INVENTORY ===
125- sed -e 's/password: .*/password: "[redacted]"/' < inventory.yaml || true
130+ if [ -f 'spec/fixtures/litmus_inventory.yaml' ]; then
131+ FILE='spec/fixtures/litmus_inventory.yaml'
132+ elif [ -f 'inventory.yaml' ]; then
133+ FILE='inventory.yaml'
134+ fi
135+ sed -e 's/password: .*/password: "[redacted]"/' < $FILE || true
126136 echo ::endgroup::
127- - name : Disable gpg check google-cloud.repo
128- uses : nick-invision/retry@v1
129- with :
130- timeout_minutes : 30
131- max_attempts : 5
132- retry_wait_seconds : 60
133- command : buildevents cmd $TRACE_ID $STEP_ID 'rake kubernetes::disable_gpg' -- bundle exec bolt --modulepath spec/fixtures/modules command run "sed -i 's/gpgcheck=1/gpgcheck=0/g' /etc/yum.repos.d/google-cloud.repo" --targets '*' -i ./inventory.yaml
137+ echo INVENTORY_PATH=$FILE >> $GITHUB_ENV
138+
134139 - name : Puppet server setup
135140 run : |
136- 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
141+ buildevents cmd $TRACE_ID $STEP_ID 'rake kubernetes::puppetserver_setup' -- bundle exec bolt --modulepath spec/fixtures/modules plan run kubernetes::puppetserver_setup collection='${{ matrix.collection }}' -i ./$INVENTORY_PATH
142+
137143 - name : Install agent
138- uses : nick-invision/retry@v1
139- with :
140- timeout_minutes : 30
141- max_attempts : 5
142- retry_wait_seconds : 60
143- command : buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:install_agent ${{ matrix.collection }}' -- bundle exec rake 'litmus:install_agent[${{ matrix.collection }}]'
144+ run : |
145+ buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:install_agent ${{ matrix.collection }}' -- bundle exec rake 'litmus:install_agent[${{ matrix.collection }}]'
144146
145147 - name : Install module
146148 run : |
147149 buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:install_module' -- bundle exec rake 'litmus:install_module'
150+
151+ - name : Start SSH session
152+ uses : luchihoratiu/debug-via-ssh@main
153+ with :
154+ NGROK_AUTH_TOKEN : ${{ secrets.NGROK_AUTH_TOKEN }}
155+ SSH_PASS : ${{ secrets.SSH_PASS }}
156+
148157 - name : " Honeycomb: Record deployment times"
149158 if : ${{ always() }}
150159 run : |
@@ -157,23 +166,26 @@ jobs:
157166 - name : Run integration tests
158167 run : |
159168 buildevents cmd $TRACE_ID $STEP_ID 'rake kubernetes:integration' -- bundle exec rake kubernetes:integration
169+
160170 - name : " Honeycomb: Record integration testing times"
161171 if : ${{ always() }}
162172 run : |
163173 buildevents step $TRACE_ID $STEP_ID $STEP_START 'Run integration tests'
164174 echo STEP_ID=${{ matrix.platform }}-${{ matrix.collection }}-4 >> $GITHUB_ENV
165175 echo STEP_START=$(date +%s) >> $GITHUB_ENV
176+
166177 - name : Remove test environment
167178 if : ${{ always() }}
168179 continue-on-error : true
169180 run : |
170- if [ -f inventory.yaml ]; then
181+ if [ -f inventory.yaml || -f spec/fixtures/litmus_inventory.yaml ]; then
171182 buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:tear_down' -- bundle exec rake 'litmus:tear_down'
172183 echo ::group::=== REQUEST ===
173184 cat request.json || true
174185 echo
175186 echo ::endgroup::
176187 fi
188+
177189 - name : " Honeycomb: Record removal times"
178190 if : ${{ always() }}
179191 run : |
0 commit comments