@@ -1204,14 +1204,22 @@ def void buildOlderVersionMatrix(List LSSTVersions, products) {
12041204def 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+
12121221def 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