Use clean while moving imported info
This commit is contained in:
parent
07a8a9d6a3
commit
6b35583fd2
2 changed files with 36 additions and 34 deletions
|
|
@ -5,6 +5,8 @@ pipeline {
|
|||
steps {
|
||||
script {
|
||||
meta = load("${WORKSPACE}/autobuild/Common_scripts/autobuilder.groovy").startnonbuild(this)
|
||||
|
||||
importer = load("${autobuilder.commonscripts()}/import/importer.groovy")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -23,7 +25,6 @@ pipeline {
|
|||
stage('Import source artifacts') {
|
||||
steps {
|
||||
script {
|
||||
importer = load("${autobuilder.commonscripts()}/import/importer.groovy")
|
||||
def copyoptions = importer.getNewImportOptions()
|
||||
copyoptions.source(
|
||||
SOURCE_ARTIFACT_LOCATION,
|
||||
|
|
@ -37,9 +38,14 @@ pipeline {
|
|||
}
|
||||
}
|
||||
}
|
||||
stage('Copy source artifacts') {
|
||||
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: '',
|
||||
|
|
@ -48,23 +54,8 @@ pipeline {
|
|||
targetLocation: WORKSPACE)
|
||||
])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Archiving artifacts') {
|
||||
steps {
|
||||
script {
|
||||
def artifacts = ['**/*']
|
||||
def artifactarchiver = load("${autobuilder.commonscripts()}/artifacts/archiver.groovy")
|
||||
def artifactlist = meta.generateartifacts(artifacts)
|
||||
def excludes = "${IMPORTS}/*"
|
||||
echo "Archiving artifacts: Includes: ${artifacts} Excludes: ${excludes}"
|
||||
|
||||
cleanfolders = [
|
||||
IMPORTS,
|
||||
'autobuild',
|
||||
]
|
||||
cleaner.clean(cleanfolders)
|
||||
|
||||
cleaner.clean([IMPORTS])
|
||||
|
||||
artifactarchiver.archive(meta, artifactlist)
|
||||
}
|
||||
|
|
@ -85,4 +76,4 @@ pipeline {
|
|||
echo 'Succeeded build'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,22 +13,25 @@ pipeline {
|
|||
stage('Clean exports') {
|
||||
steps {
|
||||
script {
|
||||
env.LOGICDEST = "${WORKSPACE}/logic"
|
||||
LOGICDEST = 'logic'
|
||||
cleanfolders = [
|
||||
LOGICDEST,
|
||||
"${WORKSPACE}/embedded_logic",
|
||||
]
|
||||
cleaner = load("${autobuilder.commonscripts()}/clean/clean.groovy")
|
||||
cleaner.clean(cleanfolders)
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Copying logic artifacts') {
|
||||
stage('Import source artifacts') {
|
||||
steps {
|
||||
script {
|
||||
sh('env')
|
||||
def logicoptions = importer.getNewImportOptions()
|
||||
logicoptions.source(LOGIC_ARTIFACT_LOCATION, LOGIC_ARTIFACT_PROJECT, LOGIC_ARTIFACT_BUILD_SELECTOR, LOGIC_ARTIFACT_RELEASE_REPO, LOGIC_ARTIFACT_RELEASE_REVISION)
|
||||
logicoptions.source(
|
||||
LOGIC_ARTIFACT_LOCATION,
|
||||
LOGIC_ARTIFACT_PROJECT,
|
||||
LOGIC_ARTIFACT_BUILD_SELECTOR,
|
||||
LOGIC_ARTIFACT_RELEASE_REPO,
|
||||
LOGIC_ARTIFACT_RELEASE_REVISION)
|
||||
importer.artifactimport(meta, logicoptions, LOGICDEST)
|
||||
}
|
||||
}
|
||||
|
|
@ -36,14 +39,22 @@ pipeline {
|
|||
stage('Archiving artifacts') {
|
||||
steps {
|
||||
script {
|
||||
def artifactlist = meta.generateartifacts(["embedded_logic/**"])
|
||||
sh """
|
||||
rm -v -rf meta
|
||||
# The following is removing a deprecated folder
|
||||
rm -v -rf diff
|
||||
mv -v "logic"/* .
|
||||
"""
|
||||
artifactarchiver = load("${autobuilder.commonscripts()}/artifacts/archiver.groovy")
|
||||
def artifactlist = meta.generateartifacts(['**/*'])
|
||||
def artifactarchiver = load("${autobuilder.commonscripts()}/artifacts/archiver.groovy")
|
||||
|
||||
cleaner.clean(['meta', 'autobuild'])
|
||||
|
||||
dir(LOGICDEST) {
|
||||
fileOperations([
|
||||
fileCopyOperation(excludes: '',
|
||||
flattenFiles: false,
|
||||
includes: '**/*',
|
||||
targetLocation: WORKSPACE)
|
||||
])
|
||||
}
|
||||
|
||||
cleaner.clean([LOGICDEST])
|
||||
|
||||
artifactarchiver.archive(meta, artifactlist)
|
||||
}
|
||||
}
|
||||
|
|
@ -63,4 +74,4 @@ pipeline {
|
|||
echo 'Succeeded build'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue