Skip to content

Commit e092299

Browse files
committed
combine provision with agent installation to retry both
1 parent 80a0bb1 commit e092299

1 file changed

Lines changed: 11 additions & 13 deletions

File tree

.github/workflows/module_acceptance.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -132,25 +132,23 @@ jobs:
132132
bundle env
133133
echo ::endgroup::
134134
135-
- name: "Provision environment"
136-
run: |
137-
if [[ "${{ inputs.kernel_modules }}" == "true" ]] && [[ "${{matrix.platforms.provider}}" =~ docker* ]] ; then
138-
DOCKER_RUN_OPTS="docker_run_opts: {'--volume': '/lib/modules/$(uname -r):/lib/modules/$(uname -r)'}"
139-
else
140-
DOCKER_RUN_OPTS=''
141-
fi
142-
bundle exec rake "litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }},$DOCKER_RUN_OPTS]"
143-
# Redact password
144-
FILE='spec/fixtures/litmus_inventory.yaml'
145-
sed -e 's/password: .*/password: "[redacted]"/' < $FILE || true
146-
147-
- name: "Install Puppet agent"
135+
- name: "Provision and install Puppet agent"
148136
uses: nick-fields/retry@v3
149137
with:
150138
timeout_minutes: 10
151139
max_attempts: 10
152140
retry_wait_seconds: 30
153141
command: |
142+
if [[ "${{ inputs.kernel_modules }}" == "true" ]] && [[ "${{matrix.platforms.provider}}" =~ docker* ]] ; then
143+
DOCKER_RUN_OPTS="docker_run_opts: {'--volume': '/lib/modules/$(uname -r):/lib/modules/$(uname -r)'}"
144+
else
145+
DOCKER_RUN_OPTS=''
146+
fi
147+
bundle exec rake "litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }},$DOCKER_RUN_OPTS]"
148+
# Redact password
149+
FILE='spec/fixtures/litmus_inventory.yaml'
150+
sed -e 's/password: .*/password: "[redacted]"/' < $FILE || true
151+
154152
if [[ "${{ matrix.collection.version }}" ]] ; then
155153
export PUPPET_VERSION=${{ matrix.collection.version }}
156154
bundle exec rake 'litmus:install_agent[${{ matrix.collection.collection }}]'

0 commit comments

Comments
 (0)