Make package builds more resilient against network issues. (#11731)
* Make package builds more resilient against network issues. This adds a step to our package build workflows to pull the required Docker imageas ahead of time and fial if this cannot be done. It includes an automatic retry mechanism to protect against transient network errors. * Fix retry action parameters.
Austin S. Hemmelgarn committed
Oct 29, 2021 at 07:26 UTC
0c3054059d982d353f738e391f9247c91b0ab6c4
2 files changed
+16
.github/workflows/packaging.yml
+9
@@ -127,6 +127,15 @@ jobs:
127
else
128
echo "version=${{ matrix.alias }}" >> $GITHUB_ENV
129
fi
130
+ - name: Fetch base image
131
+ uses: nick-invision/retry@v2
132
+ with:
133
+ max_attempts: 3
134
+ retry_wait_seconds: 30
135
+ timeout_seconds: 900
136
+ command: |
137
+ docker pull --platform ${{ matrix.platform }} ${{ matrix.base_image }}:${{ env.version }}
138
+ docker pull --platform ${{ matrix.platform }} netdata/package-builders:${{ matrix.distro }}${{ matrix.version }}
139
- name: Build Packages
140
shell: bash
141
run: |
.github/workflows/repoconfig-packages.yml
+7
@@ -38,6 +38,13 @@ jobs:
38
- name: Checkout
39
uses: actions/checkout@v2
40
# Unlike normally, we do not need a deep clone or submodules for this.
41
+ - name: Fetch base image
42
+ uses: nick-invision/retry@v2
43
+ with:
44
+ max_attempts: 3
45
+ retry_wait_seconds: 30
46
+ timeout_seconds: 900
47
+ command: docker pull --platform ${{ matrix.platform }} ${{ matrix.base_image }}:${{ matrix.version }}
48
- name: Build Packages
49
shell: bash
50
run: |