Skip to content

Commit 9d9791f

Browse files
Vitexusclaude
andcommitted
fix: wait for RebulidDEBRepoByAnsible before apt test installation
Polls the Jenkins job color before entering the Test stage so apt-get does not hit the repository while it is being rebuilt by the Ansible republish job. Uses waitUntil instead of buildBlocker (plugin absent). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 17439db commit 9d9791f

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

debian/Jenkinsfile

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,7 @@ String vendor = 'vitexsoftware'
88
//String distroFamily = ''
99

1010
properties([
11-
copyArtifactPermission('*'),
12-
buildBlocker(
13-
useBuildBlocker: true,
14-
blockLevel: 'GLOBAL',
15-
scanQueueFor: 'ALL',
16-
blockingJobs: 'RebulidDEBRepoByAnsible'
17-
)
11+
copyArtifactPermission('*')
1812
])
1913
node() {
2014
ansiColor('xterm') {
@@ -77,6 +71,10 @@ distributions.each { distro ->
7771
}
7872

7973
stage('Test ' + distroName) {
74+
waitUntil(initialRecurrencePeriod: 30000) {
75+
def color = sh(script: "curl -sf 'https://jenkins.proxy.spojenet.cz/job/RebulidDEBRepoByAnsible/api/json?tree=color' 2>/dev/null | grep -o '"color":"[^"]*"' | cut -d'"' -f4 || echo 'blue'", returnStdout: true).trim()
76+
return !color.endsWith('_anime')
77+
}
8078
buildImage.inside {
8179
def debconf_debug = 0 //Set to "5" or "developer" to debug debconf
8280
sh 'cd $WORKSPACE/dist/debian/ ; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz; cd $WORKSPACE'

0 commit comments

Comments
 (0)