Skip to content

Commit

Permalink
Adding second wait to add compiler test to debug fail
Browse files Browse the repository at this point in the history
  • Loading branch information
ragingra committed Apr 25, 2024
1 parent fa0dc4c commit 1b3c160
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/test-add-compiler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,24 @@ jobs:
architecture=${{ matrix.architecture }} \
version=${{ matrix.version }}
- name: 'Wait as long as the file ${HOME}/pause file is present'
if: ${{ always() && github.event.inputs.ssh-debugging == 'true' }}
run: |
while [ -f "${HOME}/pause" ] ; do
echo "${HOME}/pause present, sleeping for 60 seconds..."
sleep 60
done
echo "${HOME}/pause absent, continuing workflow."
- name: 'Run add_compiler plan'
timeout-minutes: 30
timeout-minutes: 50
run: |
bundle exec bolt plan run peadm_spec::add_compiler -v \
--inventoryfile spec/fixtures/litmus_inventory.yaml \
--modulepath spec/fixtures/modules \
architecture=${{ matrix.architecture }}
architecture=${{ matrix.architecture }} \
--stream \
--log-level debug
- name: 'Wait as long as the file ${HOME}/pause file is present'
if: ${{ always() && github.event.inputs.ssh-debugging == 'true' }}
Expand Down
3 changes: 3 additions & 0 deletions spec/acceptance/peadm_spec/plans/add_compiler.pp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
$target.set_var('certname', $fqdn.first['stdout'].chomp)
}

$primary_host = $t.filter |$n| { $n.vars['role'] == 'primary' }
run_task('peadm::puppet_runonce', $primary_host)

$common_params = {
avail_group_letter => 'A',
}
Expand Down
10 changes: 3 additions & 7 deletions tasks/puppet_runonce.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,16 @@ echo
# - Without --detailed-exitcodes, the `puppet agent` command will return 0 even
# if there are a resource failures. So, use --detailed-exitcodes.
/opt/puppetlabs/bin/puppet agent \
--onetime \
--verbose \
--no-daemonize \
--no-usecacheonfailure \
--no-splay \
--no-use_cached_catalog \
--detailed-exitcodes \
--test \
--color false \
--debug \
$ENV_FLAG \
$NOOP_FLAG

# Only exit non-zero if an error occurred. Changes (detailed exit code 2) are
# not errors.
exitcode=$?
echo "Puppet agent exited with code $exitcode"
if [ $exitcode -eq 0 -o $exitcode -eq 2 ]; then
exit 0
else
Expand Down

0 comments on commit 1b3c160

Please sign in to comment.