Squashed 'Common_scripts/' changes from 2ab8282..0326879
0326879Eliminate a copy for performancecbc3289Eliminate a copy for performance3271d90Eliminate a copy for performance4044992Eliminate a copy for performance2e74e8aEliminate a copy for performance10d0019Ensure script objects are around when source files have been cleaned1e29bd5Force item copier workspace to be cleaned each time5575f2bDon't attempt to import artifacts associated with components that do not have complete meta9b89c0fCORE-348 - Reverse a debugging change3db76ceMerge remote-tracking branch 'origin/master' into CORE-3482a17eb0Merge commit 'ad8723e7c8df7b9ffceec3540fd88e9f847e7a7f' into productionb9f5240/ missing when doing hierarchical release repo checkoute67bec1When doing nested release repo imports - ignore components that have incomplete release info16d7c9cMerge remote-tracking branch 'origin/master' into CORE-34856951baCORE-348: Trying to resolve a git error in the autobuild. git-subtree-dir: Common_scripts git-subtree-split:0326879391
This commit is contained in:
parent
c84a6cc5be
commit
d1a56a994c
2 changed files with 23 additions and 33 deletions
|
|
@ -4,21 +4,13 @@ pipeline {
|
|||
stage('Initial setup') {
|
||||
steps {
|
||||
script {
|
||||
// Force workspace to be cleaned
|
||||
CLEAN_WORKSPACE = "true"
|
||||
meta = load("${WORKSPACE}/autobuild/Common_scripts/autobuilder.groovy").startnonbuild(this)
|
||||
|
||||
importer = load("${autobuilder.commonscripts()}/import/importer.groovy")
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Clean exports') {
|
||||
steps {
|
||||
script {
|
||||
IMPORTS = 'imports'
|
||||
cleanfolders = [
|
||||
IMPORTS,
|
||||
]
|
||||
cleaner = load("${autobuilder.commonscripts()}/clean/clean.groovy")
|
||||
cleaner.clean(cleanfolders)
|
||||
artifactarchiver = load("${autobuilder.commonscripts()}/artifacts/archiver.groovy")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -34,29 +26,25 @@ pipeline {
|
|||
SOURCE_ARTIFACT_RELEASE_REVISION)
|
||||
echo "Nested: ${NESTED_COPY}"
|
||||
copyoptions.setnested(NESTED_COPY == 'true')
|
||||
importer.artifactimport(meta, copyoptions, IMPORTS)
|
||||
importer.artifactimport(meta, copyoptions, "${WORKSPACE}/.")
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Archiving artifacts') {
|
||||
steps {
|
||||
script {
|
||||
def artifactlist = meta.generateartifacts(['**/*'])
|
||||
def artifactarchiver = load("${autobuilder.commonscripts()}/artifacts/archiver.groovy")
|
||||
// Save the imported meta - while the unwanted meta is written to file then deleted
|
||||
def stashname = 'Imported meta stash'
|
||||
stash(allowEmpty: true,
|
||||
includes: 'meta/**',
|
||||
name: stashname,
|
||||
useDefaultExcludes: false)
|
||||
|
||||
def artifactlist = meta.generateartifacts(['**/*'])
|
||||
cleaner.clean(['meta', 'autobuild'])
|
||||
|
||||
dir(IMPORTS) {
|
||||
fileOperations([
|
||||
fileCopyOperation(excludes: '',
|
||||
flattenFiles: false,
|
||||
includes: '**/*',
|
||||
targetLocation: WORKSPACE)
|
||||
])
|
||||
}
|
||||
unstash(name: stashname)
|
||||
|
||||
cleaner.clean([IMPORTS])
|
||||
|
||||
artifactarchiver.archive(meta, artifactlist)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -239,15 +239,17 @@ def hierarchyartifactimportfromrepo(meta, ImportOptions importoptions, String de
|
|||
def cloneurl = relatedmeta.releaseinfo.releaserepoURL
|
||||
def clonerevision = "refs/tags/${relatedmeta.releasetag()}"
|
||||
def clonepath = "${destpath}/${relatedoffsetpath}"
|
||||
echo "Cloning release repo: ${cloneurl}, revision: ${clonerevision} at folder: ${clonepath}"
|
||||
|
||||
gh.gitCheckoutAlt(cloneurl, clonerevision, clonepath, "", 1, true, [])
|
||||
|
||||
gh.stripgithistory(clonepath)
|
||||
|
||||
def metafilepath = "${clonepath}${relatedmeta.metafilepath()}"
|
||||
echo "Marking related meta as released and rewriting meta file: ${metafilepath}"
|
||||
rewritemetafileasreleased(relatedmeta, metafilepath)
|
||||
if (relatedmeta.componentidentifier() != '_' &&
|
||||
cloneurl != '') {
|
||||
echo "Cloning release repo: ${cloneurl}, revision: ${clonerevision} at folder: ${clonepath}"
|
||||
gh.gitCheckoutAlt(cloneurl, clonerevision, clonepath, "", 1, true, [])
|
||||
gh.stripgithistory(clonepath)
|
||||
def metafilepath = "${clonepath}/${relatedmeta.metafilepath()}"
|
||||
echo "Marking related meta as released and rewriting meta file: ${metafilepath}"
|
||||
rewritemetafileasreleased(relatedmeta, metafilepath)
|
||||
} else {
|
||||
echo "Not importing component that would be placed at path: ${clonepath}"
|
||||
}
|
||||
}
|
||||
gh.stripgithistory(destpath)
|
||||
def metafilepath = "${destpath}/${meta.metafilepath()}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue