Add doxygen deployment script

This commit is contained in:
Dan Hawkins 2020-09-06 08:27:55 +01:00
commit 2ae9dfcecc

View file

@ -34,32 +34,28 @@ pipeline {
buildstampprefix = doxygenmeta.buildstampinfo.buildstampprefix
echo "Doyxgen imported for product: ${productname} and build stamp prefix: ${buildstampprefix}"
pathonserver = "${ROOT_PATH_ON_SERVER}/${productname}/${buildstampprefix}"
}
}
}
stage('Clean destination') {
steps {
script {
cleanfolders = [
pathonserver,
]
cleaner = load("${autobuilder.commonscripts()}/clean/clean.groovy")
cleaner.clean(cleanfolders)
}
}
}
stage('Copy doxygen to server') {
steps {
script {
doxygensource = "${DOXYGEN}/${ARTIFACT_PATH_TO_DOXYGEN_ROOT}"
echo "Copying from ${doxygensource} to ${pathonserver}"
dir(pathonserver) {
}
dir(doxygensource) {
fileOperations([fileCopyOperation(targetLocation: pathonserver)])
pathonserver = "${ROOT_PATH_ON_SERVER.trim()}/${productname}/${buildstampprefix}"
echo "Moving 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
mv -v "${doxygensource}"/* "${pathonserver}"
if [ \$? -ne 0 ]; then exit 1; fi
} else {
error("This job does not run on Windows at the moment")
}
}
}