Create a script to copy logic to a build job - so that it will be stamped during release
This commit is contained in:
parent
323da9fdf3
commit
9e0f24f0d2
1 changed files with 56 additions and 0 deletions
56
copy/logic.groovy
Normal file
56
copy/logic.groovy
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
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",
|
||||
]
|
||||
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(["logic/**"])
|
||||
archiveArtifacts "${artifactlist}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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