Correct importing
This commit is contained in:
parent
d44427dda2
commit
fccc2e52b3
1 changed files with 3 additions and 68 deletions
|
|
@ -309,74 +309,6 @@ def artifactimport(meta, ImportOptions importoptions, String destpath) {
|
||||||
return meta
|
return meta
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated (use above)
|
|
||||||
def artifactimport(meta,
|
|
||||||
String sourceselect,
|
|
||||||
String jenkinsjob,
|
|
||||||
buildnumberorselector,
|
|
||||||
String repo,
|
|
||||||
String revision,
|
|
||||||
String destpath,
|
|
||||||
boolean incrementversionnumber = true,
|
|
||||||
String filter = '',
|
|
||||||
String excludes = '',
|
|
||||||
boolean fingerprint = false,
|
|
||||||
boolean nested = false) {
|
|
||||||
echo "DEPRECATED method: artifactimport(meta, String source, String jenkinsjob, buildnumberorselector, String repo, String revision, String destpath ...)"
|
|
||||||
def importoptions = importer.getNewImportOptions()
|
|
||||||
|
|
||||||
importoptions.source(sourceselect, jenkinsjob, buildnumberorselector, repo, revision)
|
|
||||||
importoptions.setincrementversionnumber(incrementversionnumber)
|
|
||||||
importoptions.setfilter(filter)
|
|
||||||
importoptions.setexcludes(excludes)
|
|
||||||
importoptions.setfingerprint(fingerprint)
|
|
||||||
importoptions.setnested(nested)
|
|
||||||
|
|
||||||
return artifactimport(meta, importoptions, destpath)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Deprecated (use above)
|
|
||||||
def artifactimport(meta,
|
|
||||||
String buildjob,
|
|
||||||
int buildnumber,
|
|
||||||
String destpath,
|
|
||||||
boolean incrementversionnumber = true,
|
|
||||||
String filter = '**',
|
|
||||||
String excludes = '',
|
|
||||||
boolean fingerprint = false) {
|
|
||||||
echo "DEPRECATED method: artifactimport(meta, String buildjob, int buildnumber, String destpath, ...)"
|
|
||||||
def importoptions = importer.getNewImportOptions()
|
|
||||||
|
|
||||||
importoptions.jenkinsjob(buildjob, "<SpecificBuildSelector plugin='copyartifact@1.41'> <buildNumber>${buildnumber}</buildNumber></SpecificBuildSelector>")
|
|
||||||
importoptions.setincrementversionnumber(incrementversionnumber)
|
|
||||||
importoptions.setfilter(filter)
|
|
||||||
importoptions.setexcludes(excludes)
|
|
||||||
importoptions.setfingerprint(fingerprint)
|
|
||||||
|
|
||||||
return artifactimport(meta, importoptions, destpath)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Deprecated (use above)
|
|
||||||
def artifactimport(meta,
|
|
||||||
String buildjob,
|
|
||||||
buildnumberorselector,
|
|
||||||
String destpath,
|
|
||||||
boolean incrementversionnumber = true,
|
|
||||||
String filter = '',
|
|
||||||
String excludes = '',
|
|
||||||
boolean fingerprint = false) {
|
|
||||||
echo "DEPRECATED method: artifactimport(meta, String buildjob, buildnumberorselector, String destpath, ...)"
|
|
||||||
def importoptions = importer.getNewImportOptions()
|
|
||||||
|
|
||||||
importoptions.jenkinsjob(buildjob, buildnumberorselector)
|
|
||||||
importoptions.setincrementversionnumber(incrementversionnumber)
|
|
||||||
importoptions.setfilter(filter)
|
|
||||||
importoptions.setexcludes(excludes)
|
|
||||||
importoptions.setfingerprint(fingerprint)
|
|
||||||
|
|
||||||
return artifactimport(meta, importoptions, destpath)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Import the artifacts of a named child component found below parent meta's hierarchy
|
// Import the artifacts of a named child component found below parent meta's hierarchy
|
||||||
def artifactimport(meta,
|
def artifactimport(meta,
|
||||||
parentmeta,
|
parentmeta,
|
||||||
|
|
@ -393,9 +325,12 @@ def artifactimport(meta,
|
||||||
def findresults = parentmeta.findAssociatedMeta(parentmetapath, childproduct, childsubcomponent)
|
def findresults = parentmeta.findAssociatedMeta(parentmetapath, childproduct, childsubcomponent)
|
||||||
if (findresults.matchfound) {
|
if (findresults.matchfound) {
|
||||||
childmeta = findresults.matchedmetaitem.metainfo
|
childmeta = findresults.matchedmetaitem.metainfo
|
||||||
|
echo "Child meta indicates it is released: ${childmeta.releaseinfo.released}"
|
||||||
if (importoptions.m_sourceselect == 'Release repository' || childmeta.releaseinfo.released) {
|
if (importoptions.m_sourceselect == 'Release repository' || childmeta.releaseinfo.released) {
|
||||||
|
echo "Importing from release repo"
|
||||||
importoptions.releaserepo(childmeta.releaseinfo.releaserepoURL, childmeta.releasetag())
|
importoptions.releaserepo(childmeta.releaseinfo.releaserepoURL, childmeta.releasetag())
|
||||||
} else {
|
} else {
|
||||||
|
echo "Importing from jenkins job"
|
||||||
importoptions.jenkinsjob(childmeta.jenkinsbuildinfo.buildjobname, childmeta.jenkinsbuildinfo.buildnumber)
|
importoptions.jenkinsjob(childmeta.jenkinsbuildinfo.buildjobname, childmeta.jenkinsbuildinfo.buildnumber)
|
||||||
}
|
}
|
||||||
childmeta2 = importer.artifactimport(meta, importoptions, destinationfolder)
|
childmeta2 = importer.artifactimport(meta, importoptions, destinationfolder)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue