debian packaging: wait for package availability before sending
Rocket.Chat notification
This commit is contained in:
parent
c76ca6cd5c
commit
ea7f44f0f1
|
@ -110,6 +110,10 @@ pipeline {
|
||||||
env.packageBranch
|
env.packageBranch
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// On attend que les paquets soient disponibles
|
||||||
|
// sur Vulcain pour envoyer la notification de diffusion
|
||||||
|
waitForPackages(env.ref, result)
|
||||||
|
|
||||||
// On liste l'ensemble des paquets construits
|
// On liste l'ensemble des paquets construits
|
||||||
def publishedPackages = result.collect { r ->
|
def publishedPackages = result.collect { r ->
|
||||||
|
@ -194,4 +198,28 @@ def findMatchingVMTemplate(String distrib) {
|
||||||
'eole-2.6.2': 'eolebase-2.6.2-cadoles'
|
'eole-2.6.2': 'eolebase-2.6.2-cadoles'
|
||||||
]
|
]
|
||||||
return vmTemplatesMap.get(distrib, null)
|
return vmTemplatesMap.get(distrib, null)
|
||||||
|
}
|
||||||
|
|
||||||
|
def waitForPackages(String tagRef, buildResults) {
|
||||||
|
def packageVersion = tagRef.split('/')[3];
|
||||||
|
|
||||||
|
buildResults.each { r ->
|
||||||
|
def distrib = "${r.distrib.split('-')[1]}-${r.env}"
|
||||||
|
|
||||||
|
r.packages.each { p ->
|
||||||
|
def file = new File(p)
|
||||||
|
def fileNameParts = file.getName().take(file.getName().lastIndexOf('.')).split('_')
|
||||||
|
def packageName = fileNameParts[0]
|
||||||
|
def packageArch = fileNameParts[2]
|
||||||
|
|
||||||
|
debian.waitForRepoPackage(packageName, [
|
||||||
|
baseURL: 'https://vulcain.cadoles.com',
|
||||||
|
distrib: distrib,
|
||||||
|
component: 'main',
|
||||||
|
type: 'binary',
|
||||||
|
arch: packageArch,
|
||||||
|
expectedVersion: packageVersion
|
||||||
|
])
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue