Add filtered copy
This commit is contained in:
parent
0285f04410
commit
44b189c724
1 changed files with 70 additions and 0 deletions
70
copy/filtered.groovy
Normal file
70
copy/filtered.groovy
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
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') {
|
||||
steps {
|
||||
script {
|
||||
env.IMPORT = "${WORKSPACE}/import"
|
||||
env.FILTEREDDEST = "${WORKSPACE}/filtered"
|
||||
cleanfolders = [
|
||||
FILTEREDDEST,
|
||||
IMPORT,
|
||||
]
|
||||
cleaner = load("${autobuilder.commonscripts()}/clean/clean.groovy")
|
||||
cleaner.clean(cleanfolders)
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Import artifacts') {
|
||||
steps {
|
||||
script {
|
||||
importer.artifactimport(meta, ARTIFACT_LOCATION, ARTIFACT_PROJECT, ARTIFACT_BUILD_SELECTOR, RELEASE_REPO, RELEASE_REVISION, IMPORT)
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Filtered copy') {
|
||||
steps {
|
||||
script {
|
||||
dir(IMPORT) {
|
||||
fileOperations([
|
||||
fileCopyOperation(excludes: EXCLUDES,
|
||||
flattenFiles: FLATTENOUTPUT,
|
||||
includes: INCLUDES,
|
||||
targetLocation: FILTEREDDEST)])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Archiving artifacts') {
|
||||
steps {
|
||||
script {
|
||||
def artifactlist = meta.generateartifacts(["filtered/**"])
|
||||
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