Merge commit '2e7e846bcd3fdd1e2ce478e01c36d361cd4f0e06'
This commit is contained in:
commit
9030623fc3
4 changed files with 76 additions and 5 deletions
|
|
@ -40,12 +40,14 @@ def startbuild(script, String productname = PRODUCT_NAME, String subcomponentnam
|
|||
conditionalclean()
|
||||
|
||||
def meta = getmetafolderscript().metareset(script)
|
||||
echo "Product name: ${productname} Subcomponent name: ${subcomponentname}"
|
||||
meta.productinfo.set(productname, subcomponentname)
|
||||
def now = new Date()
|
||||
now.format("yyMMdd.HHmm", TimeZone.getTimeZone('UTC'))
|
||||
meta.jenkinsbuildinfo.set(JOB_NAME, BUILD_ID.toInteger(), NODE_NAME, now.toString())
|
||||
|
||||
def rr = load("${commonscripts()}/release/registerrepo.groovy")
|
||||
echo "Release repo: ${releaserepo}"
|
||||
rr.registerrepo(meta, releaserepo)
|
||||
|
||||
def ch = load("${commonscripts()}/configuration/configuration.groovy")
|
||||
|
|
|
|||
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'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -211,9 +211,9 @@ def boolean releasegittag(String postcommitshacode, String tag) {
|
|||
// Check if tag exists already
|
||||
def String existingshacode = releasegitgetshacode(tag)
|
||||
if (existingshacode) { // Tag exists
|
||||
if (existingshacode != postcommitshacode) { // If the existing tag is not associated with HEAD
|
||||
if (existingshacode != postcommitshacode) { // If the existing tag is not associated with the one expected
|
||||
// This is a problem - The tag is already at another position in git repo
|
||||
setunstable("The release tag ${tag} has been used at another commit other than HEAD - You must decide what to do with it - Not good practice to delete it or move it")
|
||||
setunstable("The release tag ${tag} has been used at another commit other than one expected - You must decide what to do with it - Not good practice to delete it or move it (Existing sha code: ${existingshacode} Post commit sha code: ${postcommitshacode})")
|
||||
summaryappend("(${tag} - Could not add!)")
|
||||
} else {
|
||||
summaryappend("(${tag} - Already added)")
|
||||
|
|
@ -247,7 +247,7 @@ def boolean sourcegittag(String shacode, String tag) {
|
|||
def existingshacode = readFile(file: gitrevparseoutputfile).trim()
|
||||
if (existingshacode != shacode) { // If the existing tag is not associated with HEAD
|
||||
// This is a problem - The tag is already at another position in git repo
|
||||
setunstable("The source tag ${tag} has been used at another commit (${existingshacode}) - You must decide what to do with it - Not good practice to delete it or move it")
|
||||
setunstable("The source tag ${tag} has been used at another commit (${existingshacode}) - You must decide what to do with it - Not good practice to delete it or move it (Existing sha code: ${existingshacode} Post commit sha code: ${shacode})")
|
||||
summaryappend("(${tag} - Could not add!)")
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
@Grab(group='commons-net', module='commons-net', version='2.0')
|
||||
import org.apache.commons.net.ftp.FTPClient
|
||||
|
||||
class FTPSiteInfo {
|
||||
|
|
@ -30,4 +29,4 @@ FTPClient createFTPClient(FTPSiteInfo ftpsiteinfo) {
|
|||
return ftpclient
|
||||
}
|
||||
|
||||
return this;
|
||||
return this;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue