Skip to content

Commit

Permalink
Build pipelines.lsst.io in rebuild env.
Browse files Browse the repository at this point in the history
  • Loading branch information
ktlim committed Aug 17, 2023
1 parent 6d2c72d commit 33ca043
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 29 deletions.
53 changes: 53 additions & 0 deletions pipelines/lib/util.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -1224,6 +1224,59 @@ def void librarianPuppet(String cmd='install', String tag='2.2.3') {
}
}

/**
* Build pipelines.lsst.io docs
*
* @param p Map
* @param p.nodeLabel String label of node to build on
* @param p.workspace String directory containing lsstsw build
* @param p.baseImage String base docker image
* @param p.manifestId String manifest id of lsst_distrib build
* @param p.eupsTag String tag to publish under
*/
def buildPipelinesDocs(Map p) {
requireMapKeys(p, [
'nodeLabel',
'workspace',
'baseImage',
'manifestId,
'eupsTag',
])
nodeWrap(p.nodeLabel) {
ws(p.workspace) {
dir("pipelines_lsst_io") {
gitNoNoise(
url: githubSlugToUrl("lsst/pipelines_lsst_io"),
branch: "main",
)
}
insideDockerWrap(
image: p.baseImage,
pull: true,
) {
withCredentials([[
$class: 'UsernamePasswordMultiBinding',
credentialsId: 'ltd-keeper',
usernameVariable: 'LTD_KEEPER_USER',
passwordVariable: 'LTD_KEEPER_PASSWORD',
]]) {
bash """
source "$WORKSPACE"/lsstsw/bin/envconfig
mamba install -y --no-update-deps --force-reinstall lsst-documenteer-pipelines
setup -r "$WORKSPACE"/pipelines_lsst_io -t ${p.manifestId}
cd "$WORKSPACE"/pipelines_lsst_io
stack-docs build
rm -rf "$WORKSPACE"/pipelines_lsst_io/envs/ltd
mamba create -y -p "$WORKSPACE"/pipelines_lsst_io/envs/ltd ltd-conveyor
conda activate "$WORKSPACE"/pipelines_lsst_io/envs/ltd
ltd -u $LTD_KEEPER_USER -p $LTD_KEEPER_PASSWORD upload --product pipelines --dir _build/html --git-ref ${p.eupsTag}
"""
} // withCredentials
} // docker
} // ws
} // node
} // def
/**
* run documenteer doc build
*
Expand Down
24 changes: 9 additions & 15 deletions pipelines/release/nightly_release.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -175,21 +175,15 @@ notify.wrap {
}

triggerMe['doc build'] = {
retry(retries) {
build(
job: 'sqre/infra/documenteer',
parameters: [
string(name: 'EUPS_TAG', value: eupsTag),
string(name: 'LTD_SLUG', value: eupsTag),
string(name: 'RELEASE_IMAGE', value: stackResults.image),
booleanParam(
name: 'PUBLISH',
value: scipipe.release.step.documenteer.publish,
),
],
wait: false,
)
} // retry
stage('build and publish docs') {
util.buildPipelinesDocs(
nodeLabel: lsstswConfig.label,
workspace: scipipe.canonical.workspace,
baseImage: lsstswConfig.image,
manifestId: manifestId,
eupsTag: eupsTag,
)
} // stage
}

triggerMe['ap_verify'] = {
Expand Down
22 changes: 8 additions & 14 deletions pipelines/release/weekly_release.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -175,21 +175,15 @@ notify.wrap {
}

triggerMe['doc build'] = {
retry(retries) {
build(
job: 'sqre/infra/documenteer',
parameters: [
string(name: 'EUPS_TAG', value: eupsTag),
string(name: 'LTD_SLUG', value: eupsTag),
string(name: 'RELEASE_IMAGE', value: stackResults.image),
booleanParam(
name: 'PUBLISH',
value: scipipe.release.step.documenteer.publish,
),
],
wait: false,
stage('build and publish docs') {
util.buildPipelinesDocs(
nodeLabel: lsstswConfig.label,
workspace: scipipe.canonical.workspace,
baseImage: lsstswConfig.image,
manifestId: manifestId,
eupsTag: eupsTag,
)
} // retry
} // stage
}

triggerMe['ap_verify'] = {
Expand Down

0 comments on commit 33ca043

Please sign in to comment.