45 lines
No EOL
1.2 KiB
Groovy
45 lines
No EOL
1.2 KiB
Groovy
// Assume that WORKSPACE environment variable is set
|
|
|
|
autobuildroot = "${WORKSPACE}/autobuild"
|
|
|
|
commonscriptsroot = "${autobuildroot}/Common_scripts"
|
|
|
|
def conditionalclean(doclean = "${CLEAN_WORKSPACE}" == "true") {
|
|
if (doclean) {
|
|
echo "Cleaning workspace"
|
|
// Save any script files that were loaded into the workspace at first and are required after cleaning the workspace
|
|
stash allowEmpty: true, includes: 'autobuild/**/*', name: 'Clean workspace stash', useDefaultExcludes: false
|
|
cleanWs()
|
|
unstash name: 'Clean workspace stash'
|
|
}
|
|
else {
|
|
echo "Not cleaning workspace"
|
|
}
|
|
}
|
|
|
|
// Start up boilderplate
|
|
def start(autobuildpath = "${WORKSPACE}/autobuild", commonscriptspath = "${autobuildroot}/Common_scripts") {
|
|
echo "Starting...."
|
|
|
|
autobuildroot = autobuildpath
|
|
commonscriptsroot = commonscriptspath
|
|
|
|
conditionalclean()
|
|
|
|
configurationhelper = load("${commonscriptsroot}/configuration/configuration.groovy")
|
|
configurationhelper.registerPipelineScriptConfiguration()
|
|
}
|
|
|
|
def commonscripts() {
|
|
return commonscriptsroot
|
|
}
|
|
|
|
def getautobuildpath() {
|
|
return autobuildroot
|
|
}
|
|
|
|
def configurationhelper() {
|
|
return load("${commonscripts()}/configuration/configuration.groovy")
|
|
}
|
|
|
|
return this; |