aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBobosila Victor <victor.bobosila@puppet.com>2022-01-14 16:06:31 +0200
committerGitHub <noreply@github.com>2022-01-14 16:06:31 +0200
commit1bd7334541b4dc0a6f14b0363d53caa56376242d (patch)
tree0e01d011067e59a79c37e8f11496bfe85da63e3f
parentbc16ad7370893d68ca9f922dba4461a53b82e894 (diff)
parentcfcffc7dd2f6191dc59d0256587bf5b57a8bb1a2 (diff)
downloadpuppet-sshkeys_core-1bd7334541b4dc0a6f14b0363d53caa56376242d.tar.gz
puppet-sshkeys_core-1bd7334541b4dc0a6f14b0363d53caa56376242d.tar.bz2
Merge pull request #60 from mhashizume/maint/nightly_gem_workflows
(maint) Adds retries to nightly gem tests
-rw-r--r--.github/workflows/dispatch_unit_tests_with_nightly_puppet_gem.yaml13
-rw-r--r--.github/workflows/unit_tests_with_nightly_puppet_gem.yaml13
2 files changed, 22 insertions, 4 deletions
diff --git a/.github/workflows/dispatch_unit_tests_with_nightly_puppet_gem.yaml b/.github/workflows/dispatch_unit_tests_with_nightly_puppet_gem.yaml
index 6df3956..b8a15f1 100644
--- a/.github/workflows/dispatch_unit_tests_with_nightly_puppet_gem.yaml
+++ b/.github/workflows/dispatch_unit_tests_with_nightly_puppet_gem.yaml
@@ -103,8 +103,17 @@ jobs:
- name: Install the latest nightly build of puppet${{ env.puppet_version }} gem
run: |
- curl http://nightlies.puppet.com/downloads/gems/puppet${{ env.puppet_version }}-nightly/puppet-${{ needs.set_output_data.outputs.puppet_short_commit }}${{ matrix.gem_file_postfix }} --output puppet.gem
- gem install puppet.gem -N
+ sleep_time=0
+ until [ $sleep_time -ge 15 ]
+ do
+ curl --location http://nightlies.puppet.com/downloads/gems/puppet${{ matrix.puppet_version }}-nightly/${{ matrix.gem_file }} --output puppet.gem
+ gem install puppet.gem -N && break
+
+ sleep_time=$((sleep_time*2+1))
+ echo "Retrying download and install of gem in $sleep_time seconds..."
+ sleep $sleep_time
+ done
+ shell: bash
- name: Prepare testing environment with bundler
run: |
diff --git a/.github/workflows/unit_tests_with_nightly_puppet_gem.yaml b/.github/workflows/unit_tests_with_nightly_puppet_gem.yaml
index 2ea5e91..206e1de 100644
--- a/.github/workflows/unit_tests_with_nightly_puppet_gem.yaml
+++ b/.github/workflows/unit_tests_with_nightly_puppet_gem.yaml
@@ -45,8 +45,17 @@ jobs:
- name: Install the latest nightly build of puppet${{ matrix.puppet_version }} gem
run: |
- curl http://nightlies.puppet.com/downloads/gems/puppet${{ matrix.puppet_version }}-nightly/${{ matrix.gem_file }} --output puppet.gem
- gem install puppet.gem -N
+ sleep_time=0
+ until [ $sleep_time -ge 15 ]
+ do
+ curl --location http://nightlies.puppet.com/downloads/gems/puppet${{ matrix.puppet_version }}-nightly/${{ matrix.gem_file }} --output puppet.gem
+ gem install puppet.gem -N && break
+
+ sleep_time=$((sleep_time*2+1))
+ echo "Retrying download and install of gem in $sleep_time seconds..."
+ sleep $sleep_time
+ done
+ shell: bash
- name: Prepare testing environment with bundler
run: |