Skip to content

Commit 12a11bc

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 9d5462e commit 12a11bc

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
@@ -14,13 +14,7 @@ String[] distributions = [
1414
String vendor = 'vitexsoftware'
1515

1616
properties([
17-
copyArtifactPermission('*'),
18-
buildBlocker(
19-
useBuildBlocker: true,
20-
blockLevel: 'GLOBAL',
21-
scanQueueFor: 'ALL',
22-
blockingJobs: 'RebulidDEBRepoByAnsible'
23-
)
17+
copyArtifactPermission('*')
2418
])
2519
node() {
2620
ansiColor('xterm') {
@@ -73,6 +67,10 @@ distributions.each { distro ->
7367
}
7468

7569
stage('Test ' + distroName) {
70+
waitUntil(initialRecurrencePeriod: 30000) {
71+
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()
72+
return !color.endsWith('_anime')
73+
}
7674
buildImage.inside {
7775
def debconf_debug = 0
7876
sh 'cd $WORKSPACE/dist/debian/ ; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz; cd $WORKSPACE'

0 commit comments

Comments
 (0)