Skip to content

Commit 3bc0049

Browse files
authored
chore(pipeline): batch Linux images publication by distribution (#1162)
1 parent b7a5cdd commit 3bc0049

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Jenkinsfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,12 @@ def parallelStages = [failFast: false]
143143
// This function is defined in the jenkins-infra/pipeline-library
144144
infra.withDockerCredentials {
145145
if (isUnix()) {
146-
sh 'make "publish${MAKE_TARGET_SUFFIX}"'
146+
if (imageType != 'linux') {
147+
sh 'make "publish${MAKE_TARGET_SUFFIX}"'
148+
} else {
149+
// Batch Linux images publication by distribution to avoid 429 rate limit errors from Docker Hub
150+
sh 'make listgroup-linux | xargs -I {} make "publish-{}"'
151+
}
147152
} else {
148153
powershell './make.ps1 publish'
149154
}

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ list-%: check-reqs
125125
listarch-%: check-reqs
126126
@set -x; make --silent showarch-$* | jq -r '.target | keys[]'
127127

128+
# Return the list of targets of a specific bake group
129+
listgroup-%: check-reqs
130+
@set -x; make --silent show-$* | jq -r '.group | keys[]' | grep -v -e $* -e default
131+
128132
# Ensure bats exists in the current folder
129133
bats:
130134
git clone --branch v1.13.0 https://github.com/bats-core/bats-core ./bats

0 commit comments

Comments
 (0)