When importing artifacts from repo, clone subcomponents

This commit is contained in:
Dan Hawkins 2019-03-28 13:57:21 +00:00
commit 3745e27b9c
3 changed files with 19 additions and 3 deletions

View file

@ -42,6 +42,15 @@ def artifactimportfromrepo(meta, String repo, String revision, String destpath,
gh.gitCheckout(rooturl, rootrevision, destpath)
def importedmeta = meta.importrelated(destpath)
for(associatedmeta in getassociatedmeta) {
def cloneurl = associatedmeta.releaseinfo.releaserepoURL
def clonerevision = associatedmeta.releasetag()
def clonepath = "${destpath}/${associatedmeta.offsetpath}"
echo "Cloning release repo: ${cloneurl}, revision: ${clonerevision} at folder: ${clonepath}"
gh.gitCheckout(cloneurl, rootrevision, clonepath)
}
if (incrementversionnumber) {
meta.buildstampinfo.changerevision(versiongenerator.incrementrevision(meta.buildstampinfo.revision, importedmeta.buildstampinfo.revision))
}

View file

@ -477,6 +477,10 @@ class MetaInfo extends GISJsonSerialised {
associatedmeta = new ArrayList<RelatedMetaInfo>()
}
ArrayList<RelatedMetaInfo> getassociatedmeta() {
return associatedmeta
}
List configurationinfoserialised() {
def configuration = []
for (configurationitem in configurationinfo) {
@ -684,7 +688,11 @@ class MetaInfo extends GISJsonSerialised {
}
String componentversionuniqueidentifier() {
return productinfo.productname + "_" + productinfo.subcomponentname + "_" + buildstampinfo.buildstamp
return componentidentifier() + "_" + buildstampinfo.buildstamp
}
String releasetag() {
return componentversionuniqueidentifier() + "_" + jenkinsbuildinfo.buildnumber
}
Map<String, RelatedMetaInfo> putwithshortestoffsetpath(Map<String, RelatedMetaInfo> releasemetacollection, String uniquestring, RelatedMetaInfo relatedmetainfo) {

View file

@ -43,8 +43,7 @@ pipeline {
script {
def releaser = load("${autobuilder.commonscripts()}/release/do.groovy")
// Place the top level build stamp on all
def topleveltag = "${buildmeta.productinfo.productname}_${buildmeta.productinfo.subcomponentname}_${buildmeta.buildstampinfo.buildstamp}_${buildmeta.jenkinsbuildinfo.buildnumber}"
OTHER_RELEASE_TAGS = "${topleveltag},${OTHER_RELEASE_TAGS}"
OTHER_RELEASE_TAGS = "${buildmeta.releasetag()},${OTHER_RELEASE_TAGS}"
(summarystring, markunstable, unstablereason) = releaser.releasehierarchy(buildmeta, MAX_META_DEPTH, OTHER_RELEASE_TAGS, DRY_RUN_PUSH)
if (markunstable) {
env.unstablereason = unstablereason