Correct hierarchical import of artifacts from release repositories
This commit is contained in:
parent
0c87c2bccb
commit
2c26b221f1
1 changed files with 12 additions and 6 deletions
|
|
@ -151,7 +151,7 @@ def conditionalClean(ImportOptions importoptions, String destpath) {
|
|||
}
|
||||
}
|
||||
|
||||
def artifactimportfrombuildjob(meta, importoptions, String destpath) {
|
||||
def artifactimportfrombuildjob(meta, ImportOptions importoptions, String destpath) {
|
||||
if (importoptions.m_sourceselect != 'Jenkins job artifact') {
|
||||
error("Import options settings have not been set for: Jenkins job artifact")
|
||||
return
|
||||
|
|
@ -183,7 +183,7 @@ def rewritemetafileasreleased(meta, String filepath) {
|
|||
meta.saveJsonSerialised(filepath)
|
||||
}
|
||||
|
||||
def hierarchyartifactimportfromrepo(meta, importoptions, String destpath) {
|
||||
def hierarchyartifactimportfromrepo(meta, ImportOptions importoptions, String destpath) {
|
||||
if (importoptions.m_sourceselect != 'Release repository') {
|
||||
error("Import options settings have not been set for: Release repository")
|
||||
return
|
||||
|
|
@ -234,7 +234,7 @@ def hierarchyartifactimportfromrepo(meta, importoptions, String destpath) {
|
|||
return importedmeta
|
||||
}
|
||||
|
||||
def artifactimportfromrepo(meta, importoptions, String destpath) {
|
||||
def artifactimportfromrepo(meta, ImportOptions importoptions, String destpath) {
|
||||
if (importoptions.m_sourceselect != 'Release repository') {
|
||||
error("Import options settings have not been set for: Release repository")
|
||||
return
|
||||
|
|
@ -262,7 +262,7 @@ def artifactimportfromrepo(meta, importoptions, String destpath) {
|
|||
return importedmeta
|
||||
}
|
||||
|
||||
def artifactimport(meta, importoptions, String destpath) {
|
||||
def artifactimport(meta, ImportOptions importoptions, String destpath) {
|
||||
switch (importoptions.m_sourceselect) {
|
||||
case 'Jenkins job artifact':
|
||||
case 'Jenkins job artefact':
|
||||
|
|
@ -347,7 +347,13 @@ def artifactimport(meta,
|
|||
}
|
||||
|
||||
// Import the artifacts of a named child component found below parent meta's hierarchy
|
||||
def artifactimport(meta, parentmeta, String parentmetapath, String childproduct, String childsubcomponent, importoptions, String destinationfolder) {
|
||||
def artifactimport(meta,
|
||||
parentmeta,
|
||||
String parentmetapath,
|
||||
String childproduct,
|
||||
String childsubcomponent,
|
||||
ImportOptions importoptions,
|
||||
String destinationfolder) {
|
||||
// Import from parent meta
|
||||
def childmeta = meta.getNewMetaObject()
|
||||
def childmeta2
|
||||
|
|
@ -356,7 +362,7 @@ def artifactimport(meta, parentmeta, String parentmetapath, String childproduct,
|
|||
def findresults = parentmeta.findAssociatedMeta(parentmetapath, childproduct, childsubcomponent)
|
||||
if (findresults.matchfound) {
|
||||
childmeta = findresults.matchedmetaitem.metainfo
|
||||
if (childmeta.releaseinfo.released) {
|
||||
if (importoptions.m_sourceselect == 'Release repository' || childmeta.releaseinfo.released) {
|
||||
importoptions.releaserepo(childmeta.releaseinfo.releaserepoURL, childmeta.releasetag())
|
||||
} else {
|
||||
importoptions.jenkinsjob(childmeta.jenkinsbuildinfo.buildjobname, childmeta.jenkinsbuildinfo.buildnumber)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue