Merge commit 'd5e639e226a82dce0aa6a03e4a56f619069c6443'

This commit is contained in:
Dan Hawkins 2020-03-05 11:58:56 +00:00
commit 0ed820ef25
4 changed files with 76 additions and 5 deletions

View file

@ -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
View 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'
}
}
}

View file

@ -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 {

View file

@ -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;