Merge commit 'e81c50836255b0501207db0e8f3240a512c69a6d'

This commit is contained in:
Dan Hawkins 2019-12-19 13:22:13 +00:00
commit 675df04347
2 changed files with 69 additions and 9 deletions

63
copy/esw.groovy Normal file
View file

@ -0,0 +1,63 @@
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 {
env.ESW = 'esw'
env.ESWDEST = "${WORKSPACE}/${ESW}"
env.ESWEXPORT = 'embedded_software'
cleanfolders = [
ESWDEST,
ESWEXPORT,
]
cleaner = load("${autobuilder.commonscripts()}/clean/clean.groovy")
cleaner.clean(cleanfolders)
}
}
}
stage('Copying embedded software artifacts') {
steps {
script {
importer.artifactimport(meta, ESW_ARTIFACT_LOCATION, ESW_ARTIFACT_BUILD_JOB, ESW_ARTIFACT_BUILD_SELECTOR, ESW_ARTIFACT_RELEASE_REPO, ESW_ARTIFACT_RELEASE_REVISION, ESWDEST)
}
}
}
stage('Archiving artifacts') {
steps {
script {
def artifactlist = meta.generateartifacts(["${ESWEXPORT}/**"])
sh """
rm -v -rf diff
rm -v -rf meta
mv -v "${ESW}"/* .
"""
archiveArtifacts "${artifactlist}"
}
}
}
}
post {
always {
echo 'Post-build'
}
failure {
echo 'Failed build'
}
unstable {
echo 'Unstable build'
}
success {
echo 'Succeeded build'
}
}
}

View file

@ -5,16 +5,18 @@ pipeline {
steps {
script {
meta = load("${WORKSPACE}/autobuild/Common_scripts/autobuilder.groovy").startnonbuild(this)
importer = load("${autobuilder.commonscripts()}/import/importer.groovy")
}
}
}
stage('Clean exports') {
steps {
script {
env.LOGICDEST = "${WORKSPACE}/logic"
cleanfolders = [
"${WORKSPACE}/logic",
LOGICDEST,
"${WORKSPACE}/embedded_logic",
"${WORKSPACE}/diff", // Some old artifacts have this folder
]
cleaner = load("${autobuilder.commonscripts()}/clean/clean.groovy")
cleaner.clean(cleanfolders)
@ -24,11 +26,7 @@ pipeline {
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)
}
importer.artifactimport(meta, LOGIC_ARTIFACT_LOCATION, LOGIC_ARTIFACT_PROJECT, LOGIC_ARTIFACT_BUILD_SELECTOR, LOGIC_RELEASE_REPO, LOGIC_RELEASE_REVISION, LOGICDEST)
}
}
}
@ -37,7 +35,6 @@ pipeline {
script {
def artifactlist = meta.generateartifacts(["embedded_logic/**"])
sh """
rm -v -rf diff
rm -v -rf meta
mv -v "logic"/* .
"""
@ -60,4 +57,4 @@ pipeline {
echo 'Succeeded build'
}
}
}
}