debian packaging: wait for package availability before sending
Rocket.Chat notification
This commit is contained in:
parent
c76ca6cd5c
commit
ea7f44f0f1
|
@ -111,6 +111,10 @@ pipeline {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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 ->
|
||||||
return r.packages.collect { p ->
|
return r.packages.collect { p ->
|
||||||
|
@ -195,3 +199,27 @@ def findMatchingVMTemplate(String distrib) {
|
||||||
]
|
]
|
||||||
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