63 lines
No EOL
2 KiB
Groovy
63 lines
No EOL
2 KiB
Groovy
pipeline {
|
|
agent { label "${AGENT_LABEL}" }
|
|
stages {
|
|
stage('Initial setup') {
|
|
steps {
|
|
script {
|
|
meta = load("${WORKSPACE}/autobuild/Common_scripts/autobuilder.groovy").startnonbuild(this)
|
|
}
|
|
}
|
|
}
|
|
stage('Clean exports') {
|
|
steps {
|
|
script {
|
|
cleanfolders = [
|
|
"${WORKSPACE}/logic",
|
|
"${WORKSPACE}/embedded_logic",
|
|
"${WORKSPACE}/diff", // Some old artifacts have this folder
|
|
]
|
|
cleaner = load("${autobuilder.commonscripts()}/clean/clean.groovy")
|
|
cleaner.clean(cleanfolders)
|
|
}
|
|
}
|
|
}
|
|
stage('Copying logic artifacts') {
|
|
steps {
|
|
script {
|
|
env.LOGICDEST = "${WORKSPACE}/logic"
|
|
if (LOGIC_ARTIFACT_LOCATION == "Jenkins job artifact") {
|
|
importer = load("${autobuilder.commonscripts()}/import/importer.groovy")
|
|
importer.artifactimport(meta, LOGIC_ARTIFACT_PROJECT, LOGIC_ARTIFACT_BUILD_SELECTOR, LOGICDEST)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
stage('Archiving artifacts') {
|
|
steps {
|
|
script {
|
|
def artifactlist = meta.generateartifacts(["embedded_logic/**"])
|
|
sh """
|
|
rm -v -rf diff
|
|
rm -v -rf meta
|
|
mv -v "logic"/* .
|
|
"""
|
|
archiveArtifacts "${artifactlist}"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
post {
|
|
always {
|
|
echo 'Post-build'
|
|
}
|
|
failure {
|
|
echo 'Failed build'
|
|
}
|
|
unstable {
|
|
echo 'Unstable build'
|
|
}
|
|
success {
|
|
echo 'Succeeded build'
|
|
}
|
|
}
|
|
} |