Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion pipelines/lib/util.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -1218,6 +1218,23 @@ def getRubinEnv(String rubinVer) {
return command
}

def filterProducts(String rubinVer, String products) {
def eupsUrl = scipipe.eups.base_url
def etbUrl = eupsUrl + "/src/tags/" + rubinVer + ".list"

def packages = sh(
script: "curl -s \"${etbUrl}\" | grep -vE '^#' | cut -d' ' -f1",
returnStdout: true
).trim().readLines()

def pkgSet = packages as Set

return products
.split(/\s+/)
.findAll { pkgSet.contains(it) }
.join(' ')
}

def buildOlderVersionTask(String rubinVer, products, Map lsstswConfig){
def agent = lsstswConfig.label
def runDocker = {
Expand All @@ -1241,16 +1258,18 @@ def buildOlderVersionTask(String rubinVer, products, Map lsstswConfig){
}
def gitTag = rubinVer.replaceAll("^v","").replaceAll("_",".")
def rubinEnvVer = getRubinEnv(rubinVer)
def prod = filterProducts(rubinVer, products)
println "Tag: ${rubinVer}"
println "Rubin environment version: ${rubinEnvVer}"
println "Products to build: ${prod}"
dir('lsstsw') {
cloneLsstsw()
}
bash """
cd ${cwd}/lsstsw
./bin/deploy -v ${rubinEnvVer}
. bin/envconfig -n lsst-scipipe-${rubinEnvVer}
rebuild -B -r v${gitTag} -r ${gitTag} ${products}
rebuild -B -r v${gitTag} -r ${gitTag} ${prod}
"""
} // stage
} // withCredentials
Expand Down
Loading