Skip to content
Snippets Groups Projects
Commit 77b930ff authored by Martin Christoph Hierholzer's avatar Martin Christoph Hierholzer
Browse files

- build DOOCS stuff no longer on tumbleweed

- build projects only for labels which have been built for all dependencies
parent ee46eade
No related branches found
No related tags found
No related merge requests found
......@@ -12,9 +12,18 @@ def call(String libraryName, ArrayList<String> dependencyList) {
def builds = [ 'xenial-Debug',
'xenial-Release',
'bionic-Debug',
'bionic-Release',
'tumbleweed-Debug',
'tumbleweed-Release' ]
'bionic-Release' ]
def dependencies = dependencyList.join(',')
if(dependencies == "") {
dependencies = "Create Docker Images"
}
// setup build trigger
triggers {
pollSCM 'H/5 * * * *'
upstream dependencies
}
pipeline {
agent none
......
......@@ -11,9 +11,7 @@ def call() {
def builds = [ 'xenial-Debug',
'xenial-Release',
'bionic-Debug',
'bionic-Release',
'tumbleweed-Debug',
'tumbleweed-Release' ]
'bionic-Release' ]
pipeline {
agent none
......
......@@ -11,9 +11,7 @@ def call() {
def builds = [ 'xenial-Debug',
'xenial-Release',
'bionic-Debug',
'bionic-Release',
'tumbleweed-Debug',
'tumbleweed-Release' ]
'bionic-Release' ]
pipeline {
agent none
......
......@@ -14,6 +14,28 @@ def call(ArrayList<String> dependencyList, String gitUrl='') {
'bionic-Release',
'tumbleweed-Debug',
'tumbleweed-Release' ]
// only keep builds which exist for all dependencies
script {
dependencyList.each {
if( it != "" ) {
copyArtifacts filter: "builds.txt", fingerprintArtifacts: true, projectName: "${it}", selector: lastSuccessful(), target: "artefacts"
myFile = readFile(env.WORKSPACE+"/artefacts/builds.txt")
def depBuilds = myFile.split("\n")
builds.each {
if(depBuilds.find { it == owner.it } != it) {
builds.removeAll { it == owner.it }
}
}
}
}
// publish our list of builds as artefact for our downstream builds
writeFile("builds.txt", builds.join("\n"))
archiveArtifacts artifacts: "builds.txt", onlyIfSuccessful: false
}
// form comma-separated list of dependencies as needed for the trigger configuration
def dependencies = dependencyList.join(',')
if(dependencies == "") {
dependencies = "Create Docker Images"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment