Skip to content

Commit

Permalink
Merge branch 'tickets/DM-39412'
Browse files Browse the repository at this point in the history
  • Loading branch information
kfindeisen committed Jul 21, 2023
2 parents 03f9eb4 + a3d02ba commit c4fcbb9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 14 deletions.
16 changes: 14 additions & 2 deletions pipelines/lib/util.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -2104,7 +2104,8 @@ def void runGen3ToJob(Map p) {
* collectionName: collectionName,
* namespace: "lsst.example",
* datasetName: "ci_example",
* sasquatchUrl: util.sqreConfig().sasquatch.url
* sasquatchUrl: util.sqreConfig().sasquatch.url,
* branchRefs: "tickets/DM-12345 tickets/DM-67890"
* )
* @param p Map
* @param p.runDir String
Expand All @@ -2113,6 +2114,7 @@ def void runGen3ToJob(Map p) {
* @param p.namespace String The Sasquatch namespace to push to, e.g., lsst.dm.
* @param p.datasetName String The dataset name. Eg., validation_data_cfht
* @param p.sasquatchUrl String The URL to the Sasquatch REST proxy.
* @param p.branchRefs String The branch(es) used in the run, as a space-delimited string (optional).
*/
def void runVerifyToSasquatch(Map p) {
util.requireMapKeys(p, [
Expand All @@ -2136,11 +2138,20 @@ def void runVerifyToSasquatch(Map p) {
"$OUTPUT_COLLECTION" \
--dataset "$dataset" \
--url "$SASQUATCH_URL" \
--namespace "$SASQUATCH_NAMESPACE"
--namespace "$SASQUATCH_NAMESPACE" \
--extra "ci_id=$BUILD_ID" \
--extra "ci_url=$BUILD_URL" \
--extra "ci_name=$JOB_NAME" \
--extra "ci_refs=$JOB_REFS"
'''
} // run

/*
These are already present under pipeline:
- BUILD_ID
- BUILD_URL
- JOB_NAME
This var was defined automagically by matrixJob and now must be manually
set:
- dataset
Expand All @@ -2151,6 +2162,7 @@ def void runVerifyToSasquatch(Map p) {
"SASQUATCH_NAMESPACE=${p.namespace}",
"dataset=${p.datasetName}",
"SASQUATCH_URL=${p.sasquatchUrl}",
"JOB_REFS=${p.containsKey('branchRefs') ? p.branchRefs : ''}",
]) {
// TODO: need Sasquatch authentication eventually; verify_to_sasquatch.py takes a --token arg
// withCredentials([[
Expand Down
21 changes: 9 additions & 12 deletions pipelines/scipipe/ap_verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -297,18 +297,15 @@ def void verifyDataset(Map p) {
def collection = 'ap_verify-output'

def codeRef = buildCode ? code.git_ref : "main"
withEnv([
"refs=${codeRef}",
]) {
util.runVerifyToSasquatch(
runDir: runDir,
gen3Dir: gen3Dir,
collectionName: collection,
namespace: "lsst.verify.ap",
datasetName: ds.name,
sasquatchUrl: sqre.sasquatch.url
)
}
util.runVerifyToSasquatch(
runDir: runDir,
gen3Dir: gen3Dir,
collectionName: collection,
namespace: "lsst.verify.ap",
datasetName: ds.name,
sasquatchUrl: sqre.sasquatch.url,
branchRefs: codeRef
)
break
default:
currentBuild.result = 'UNSTABLE'
Expand Down

0 comments on commit c4fcbb9

Please sign in to comment.