Skip to content

Commit

Permalink
Add doc build/upload to stack-os-matrix.
Browse files Browse the repository at this point in the history
  • Loading branch information
ktlim committed Apr 23, 2021
1 parent 9e3ddda commit b9af6d9
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 3 deletions.
5 changes: 2 additions & 3 deletions jobs/stack_os_matrix.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,15 @@ p.pipeline().with {
stringParam('REFS', null, 'Whitespace delimited list of "refs" to attempt to build. Priority is highest -> lowest from left to right. "master" or branch from repos.yaml is implicitly appended to the right side of the list, if not specified; do not specify "master" explicitly.')
stringParam('PRODUCTS', scipipe.canonical.products,
'Whitespace delimited list of EUPS products to build.')
booleanParam('BUILD_DOCS', true, 'Build pipelines.lsst.io site')
booleanParam('PUBLISH_DOCS', true, 'Publish pipelines.lsst.io/v edition')
stringParam('SPLENV_REF', scipipe.template.splenv_ref, 'conda env ref')
// XXX testing only
//booleanParam('NO_FETCH', false, 'Do not pull from git remote if branch is already the current ref. (This should generally be false outside of testing the CI system)')
}

concurrentBuild(true)

environmentVariables(
BUILD_CONFIG: 'scipipe-lsstsw-matrix',
BUILD_DOCS: false,
WIPEOUT: false,
)
}
40 changes: 40 additions & 0 deletions pipelines/lib/util.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,48 @@ def lsstswBuild(
LSST_SPLENV_REF: lsstswConfig.splenv_ref
] + buildParams

if (lsstswConfig.build_docs && buildParams['LSST_BUILD_DOCS'] == "true") {
buildParams['LSST_PRODUCTS'] += " pipelines_lsst_io"
// suppress old-style doc build
buildParams['LSST_BUILD_DOCS'] = "false"
} else {
// don't publish docs if we didn't build them
buildParams['LSST_PUBLISH_DOCS'] = "false"
}

def run = {
jenkinsWrapper(buildParams)

if (buildParams['LSST_PUBLISH_DOCS'] == "true") {
withEnv(["LSST_REFS=${buildParams['LSST_REFS']}"]) {
withCredentials([[
$class: 'UsernamePasswordMultiBinding',
credentialsId: 'ltd-upload',
usernameVariable: 'LTD_USERNAME',
passwordVariable: 'LTD_PASSWORD',
]]) {
bash '''
set +o xtrace
cd lsstsw
source bin/envconfig
(
conda activate ltd &&
conda install -y -c conda-forge ltd-conveyor
) || (
conda create -y -n ltd -c conda-forge ltd-conveyor &&
conda activate ltd
)
set -o xtrace
GIT_REF=${LSST_REFS// /-}
ln -s ../../_doxygen/html/cpp-api build/pipelines_lsst_io/_build/html/cpp-api
ltd upload --product pipelines --dir build/pipelines_lsst_io/_build/html --git-ref "$GIT_REF"
set +o xtrace
conda deactivate
set -o xtrace
'''
} // withCredentials
} // withEnv
} // if LSST_PUBLISH_DOCS
} // run

def runDocker = {
Expand Down
2 changes: 2 additions & 0 deletions pipelines/stack_os_matrix.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ notify.wrap {
'BUILD_CONFIG',
'PRODUCTS',
'BUILD_DOCS',
'PUBLISH_DOCS',
'WIPEOUT',
])

def buildParams = [
LSST_REFS: REFS,
LSST_PRODUCTS: PRODUCTS,
LSST_BUILD_DOCS: BUILD_DOCS,
LSST_PUBLISH_DOCS: PUBLISH_DOCS,
]

// override conda env ref from build_matrix.yaml
Expand Down

0 comments on commit b9af6d9

Please sign in to comment.