Skip to content

Commit b83d841

Browse files
author
Matthias Wittgen
committed
Fix older release builds
1 parent aae60c9 commit b83d841

File tree

2 files changed

+20
-8
lines changed

2 files changed

+20
-8
lines changed

jobs/test_older_versions.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ p.pipeline().with {
99

1010
parameters {
1111
stringParam('PRODUCTS', scipipe.canonical.products + " lsst_sitcom", 'Whitespace delimited list of EUPS products to build.')
12-
stringParam('VERSIONS', "o_latest, 29.2.1", 'Versions to test')
12+
stringParam('VERSIONS', "o_latest, v29_2_1", 'Versions to test')
1313
}
1414
}

pipelines/lib/util.groovy

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,14 +1204,22 @@ def void buildOlderVersionMatrix(List LSSTVersions, products) {
12041204
def getNewestTag(){
12051205
def eupsUrl = scipipe.eups.base_url
12061206
def etbUrl = eupsUrl + "/src/tags/"
1207-
def command = sh(script: "curl -s \"${etbUrl}\" | grep -oE 'v[0-9]+_[0-9]+_[0-9]+' | sed 's/^v//' | sort -t'_' -k1,1n -k2,2n -k3,3n | tail -1 | tr '_' '.'", returnStdout:true).trim()
1208-
1207+
def command = sh(
1208+
script: 'curl -s "' + etbUrl + '" | grep -oE "v[0-9]+_[0-9]+_[0-9]+\\.list" | sed \'s/\\.list$//\' | sort -uV | tail -1',
1209+
returnStdout: true
1210+
).trim()
12091211
return command
12101212
} //getNewestTag
12111213

1214+
def getRubinEnv(String rubinVer) {
1215+
def eupsUrl = scipipe.eups.base_url
1216+
def etbUrl = eupsUrl + "/src/tags/" + rubinVer + ".list"
1217+
def command = sh(script: "curl -s \"${etbUrl}\" | grep '^#CONDA_ENV=' | cut -d'=' -f2", returnStdout: true).trim()
1218+
return command
1219+
}
1220+
12121221
def buildOlderVersionTask(String rubinVer, products, Map lsstswConfig){
12131222
def agent = lsstswConfig.label
1214-
12151223
def runDocker = {
12161224
insideDockerWrap(
12171225
image: lsstswConfig.image,
@@ -1228,17 +1236,21 @@ def buildOlderVersionTask(String rubinVer, products, Map lsstswConfig){
12281236
// If rubinVer is set to o_latest, get the newest rubin env from eups.lsst
12291237
if (rubinVer == "o_latest") {
12301238
def command = getNewestTag()
1231-
println command
1232-
rubinVer = command.replaceAll("v","").replaceAll("_",".")
1239+
println "Latest tag: ${command}"
1240+
rubinVer = command
12331241
}
1242+
def gitTag = rubinVer.replaceAll("^v","").replaceAll("_",".")
1243+
def rubinEnvVer = getRubinEnv(rubinVer)
1244+
println "Tag: ${rubinVer}"
1245+
println "Rubin environment version: ${rubinEnvVer}"
12341246
dir('lsstsw') {
12351247
cloneLsstsw()
12361248
}
12371249
bash """
12381250
cd ${cwd}/lsstsw
1239-
./bin/deploy
1251+
./bin/deploy -v ${rubinEnvVer}
12401252
. bin/envconfig
1241-
rebuild -B -r v${rubinVer} -r ${rubinVer} ${products}
1253+
rebuild -B -r v${gitTag} -r ${gitTag} ${products}
12421254
"""
12431255
} // stage
12441256
} // withCredentials

0 commit comments

Comments
 (0)