Suppression de la boucle et du découpage de la sortie standard
Cadoles/Jenkins/pipeline/head There was a failure building this commit
Details
Cadoles/Jenkins/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
4ce857ef7c
commit
f16e377911
|
@ -10,37 +10,34 @@ def buildPackageWithCPKG(
|
||||||
def result = [:]
|
def result = [:]
|
||||||
|
|
||||||
// Retrieve commit tags
|
// Retrieve commit tags
|
||||||
def commitTags = sh(script: 'git describe --exact-match --abbrev=0', returnStdout: true).split(' ')
|
def commitTag = sh(script: 'git describe --exact-match --abbrev=0', returnStdout: true)
|
||||||
if (commitTags.length == 0) {
|
if (commitTag == '') {
|
||||||
error 'No build build tags on last commit'
|
error 'No build build tags on last commit'
|
||||||
}
|
}
|
||||||
|
|
||||||
// For each tags
|
// Split tag to retrieve context informations
|
||||||
for (tag in commitTags) {
|
def tagParts = commitTag.split('/')
|
||||||
|
def packageEnv = tagParts[1]
|
||||||
|
def packageDistrib = tagParts[2]
|
||||||
|
def packageVersion = tagParts[3]
|
||||||
|
|
||||||
// Split tag to retrieve context informations
|
// Create .tamarinrc file
|
||||||
def tagParts = tag.split('/')
|
def tamarinrc = """
|
||||||
def packageEnv = tagParts[1]
|
project_version=${packageVersion}
|
||||||
def packageDistrib = tagParts[2]
|
no_version_suffix=${ packageEnv == 'stable' || packageEnv == 'staging' ? 'yes' : 'no' }
|
||||||
def packageVersion = tagParts[3]
|
""".stripIndent()
|
||||||
|
writeFile file: '.tamarinrc', text: tamarinrc
|
||||||
|
|
||||||
// Create .tamarinrc file
|
sh "rm -rf ${destDir}/*"
|
||||||
def tamarinrc = """
|
|
||||||
project_version=${packageVersion}
|
|
||||||
no_version_suffix=${ packageEnv == 'stable' || packageEnv == 'staging' ? 'yes' : 'no' }
|
|
||||||
""".stripIndent()
|
|
||||||
writeFile file: '.tamarinrc', text: tamarinrc
|
|
||||||
|
|
||||||
sh "rm -rf ${destDir}/*"
|
|
||||||
|
|
||||||
stage("Build ${packageEnv} package (version ${packageVersion}) for ${packageDistrib}") {
|
stage("Build ${packageEnv} package (version ${packageVersion}) for ${packageDistrib}") {
|
||||||
result.put('tag', tag)
|
result.put('tag', commitTag)
|
||||||
result.put('env', packageEnv)
|
result.put('env', packageEnv)
|
||||||
result.put('version', packageVersion)
|
result.put('version', packageVersion)
|
||||||
result.put('distrib', packageDistrib)
|
result.put('distrib', packageDistrib)
|
||||||
def packages = buildPackage(packageProfile, packageArch, baseImage, destDir, forceRebuild)
|
def packages = buildPackage(packageProfile, packageArch, baseImage, destDir, forceRebuild)
|
||||||
result.put('packages', packages)
|
result.put('packages', packages)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue