79 lines
2.5 KiB
Groovy
79 lines
2.5 KiB
Groovy
pipeline {
|
|
agent { label AGENT_LABEL }
|
|
stages {
|
|
stage('Initial setup') {
|
|
steps {
|
|
script {
|
|
meta = load("${WORKSPACE}/autobuild/Common_scripts/autobuilder.groovy").startnonbuild(this)
|
|
|
|
importer = load("${autobuilder.commonscripts()}/import/importer.groovy")
|
|
}
|
|
}
|
|
}
|
|
stage('Clean exports') {
|
|
steps {
|
|
script {
|
|
IMPORTS = 'imports'
|
|
cleanfolders = [
|
|
IMPORTS,
|
|
]
|
|
cleaner = load("${autobuilder.commonscripts()}/clean/clean.groovy")
|
|
cleaner.clean(cleanfolders)
|
|
}
|
|
}
|
|
}
|
|
stage('Import source artifacts') {
|
|
steps {
|
|
script {
|
|
def copyoptions = importer.getNewImportOptions()
|
|
copyoptions.source(
|
|
SOURCE_ARTIFACT_LOCATION,
|
|
SOURCE_ARTIFACT_BUILD_JOB,
|
|
SOURCE_ARTIFACT_BUILD_SELECTOR,
|
|
SOURCE_ARTIFACT_RELEASE_REPO,
|
|
SOURCE_ARTIFACT_RELEASE_REVISION)
|
|
echo "Nested: ${NESTED_COPY}"
|
|
copyoptions.setnested(NESTED_COPY == 'true')
|
|
importer.artifactimport(meta, copyoptions, IMPORTS)
|
|
}
|
|
}
|
|
}
|
|
stage('Archiving artifacts') {
|
|
steps {
|
|
script {
|
|
def artifactlist = meta.generateartifacts(['**/*'])
|
|
def artifactarchiver = load("${autobuilder.commonscripts()}/artifacts/archiver.groovy")
|
|
|
|
cleaner.clean(['meta', 'autobuild'])
|
|
|
|
dir(IMPORTS) {
|
|
fileOperations([
|
|
fileCopyOperation(excludes: '',
|
|
flattenFiles: false,
|
|
includes: '**/*',
|
|
targetLocation: WORKSPACE)
|
|
])
|
|
}
|
|
|
|
cleaner.clean([IMPORTS])
|
|
|
|
artifactarchiver.archive(meta, artifactlist)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
post {
|
|
always {
|
|
echo 'Post-build'
|
|
}
|
|
failure {
|
|
echo 'Failed build'
|
|
}
|
|
unstable {
|
|
echo 'Unstable build'
|
|
}
|
|
success {
|
|
echo 'Succeeded build'
|
|
}
|
|
}
|
|
}
|