Copy from Atlas Autobuild scripts as a starting point
This commit is contained in:
parent
b9a22c1989
commit
2d66e342df
92 changed files with 11897 additions and 0 deletions
80
Common_scripts/documentation/doxygen_deploy.groovy
Normal file
80
Common_scripts/documentation/doxygen_deploy.groovy
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
pipeline {
|
||||
agent { label "${AGENT_LABEL}" }
|
||||
stages {
|
||||
stage('Initial setup') {
|
||||
steps {
|
||||
script {
|
||||
meta = load("${WORKSPACE}/autobuild/Common_scripts/autobuilder.groovy").startnonbuild(this)
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Clean imports') {
|
||||
steps {
|
||||
script {
|
||||
env.DOXYGEN = "doxygen"
|
||||
cleanfolders = [
|
||||
DOXYGEN,
|
||||
]
|
||||
cleaner = load("${autobuilder.commonscripts()}/clean/clean.groovy")
|
||||
cleaner.clean(cleanfolders)
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Import doxygen artifacts') {
|
||||
steps {
|
||||
script {
|
||||
importer = load("${autobuilder.commonscripts()}/import/importer.groovy")
|
||||
def importoptions = importer.getNewImportOptions()
|
||||
|
||||
importoptions.jenkinsjob(BUILD_JOB_WITH_DOXYGEN_ARTIFACTS, BUILD_JOB_WITH_DOXYGEN_ARTIFACTS_SELECTOR)
|
||||
importoptions.setfilter(ARTIFACT_PATH_TO_DOXYGEN_ROOT + '/**')
|
||||
doxygenmeta = importer.artifactimportfrombuildjob(meta, importoptions, DOXYGEN)
|
||||
|
||||
productname = doxygenmeta.productinfo.productname
|
||||
buildstampprefix = doxygenmeta.buildstampinfo.buildstampprefix
|
||||
|
||||
echo "Doyxgen imported for product: ${productname} and build stamp prefix: ${buildstampprefix}"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Copy doxygen to server') {
|
||||
steps {
|
||||
script {
|
||||
doxygensource = "${DOXYGEN}/${ARTIFACT_PATH_TO_DOXYGEN_ROOT}"
|
||||
pathonserver = "${ROOT_PATH_ON_SERVER.trim()}/${productname}/${buildstampprefix}"
|
||||
echo "Copying from ${doxygensource} to ${pathonserver}"
|
||||
if (isUnix()) {
|
||||
sh """#!/bin/bash
|
||||
rm -rfv "${pathonserver}"
|
||||
if [ \$? -ne 0 ]; then exit 1; fi
|
||||
|
||||
mkdir -pv "${pathonserver}"
|
||||
if [ \$? -ne 0 ]; then exit 1; fi
|
||||
|
||||
echo mv -v "${doxygensource}"/ "${pathonserver}"
|
||||
mv -v "${doxygensource}"/ "${pathonserver}"
|
||||
if [ \$? -ne 0 ]; then exit 1; fi
|
||||
"""
|
||||
} else {
|
||||
error("This job does not run on Windows at the moment")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
echo 'Post-build'
|
||||
}
|
||||
failure {
|
||||
echo 'Failed build'
|
||||
}
|
||||
unstable {
|
||||
echo 'Unstable build'
|
||||
}
|
||||
success {
|
||||
echo 'Succeeded build'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue