GIS-1621 - Make an ESW copier job script
This commit is contained in:
parent
958ad765d0
commit
21c59682a1
1 changed files with 63 additions and 0 deletions
63
copy/esw.groovy
Normal file
63
copy/esw.groovy
Normal 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'
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue