Skip to content

Commit 1a9b5c5

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 74dae2c commit 1a9b5c5

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') {
@@ -65,6 +59,10 @@ distributions.each { distro ->
6559
}
6660

6761
stage('Test ' + distroName) {
62+
waitUntil(initialRecurrencePeriod: 30000) {
63+
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()
64+
return !color.endsWith('_anime')
65+
}
6866
buildImage.inside {
6967
def debconf_debug = 0 //Set to "5" or "developer" to debug debconf
7068
sh 'cd $WORKSPACE/dist/debian/ ; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz; cd $WORKSPACE'

0 commit comments

Comments
 (0)