Use raw git to checkout each tag
This commit is contained in:
parent
54bf29f749
commit
1c9579fc3b
1 changed files with 31 additions and 22 deletions
|
|
@ -159,29 +159,38 @@ def parseproductrepo(LinkedHashMap<String, ProductParsed> products,
|
|||
def ProductParsed pp
|
||||
|
||||
def ArrayList<ProductRelease> productreleases = new ArrayList<ProductRelease>()
|
||||
shatagmap.each { sha, tags ->
|
||||
def importoptions = importer.getNewImportOptions()
|
||||
importoptions.releaserepo(productrepo, sha)
|
||||
importoptions.setfilter('meta/**')
|
||||
def productreleasemeta = importer.artifactimport(meta,
|
||||
importoptions,
|
||||
productreleasefolder)
|
||||
|
||||
if (!productvariant) {
|
||||
productvariant = productreleasemeta.productvariant()
|
||||
pp = addProductEntry(products,
|
||||
productvariant, productrepo)
|
||||
dir(productreleasefolder) {
|
||||
deleteDir()
|
||||
sh """#!/bin/bash
|
||||
git init
|
||||
git config remote.origin.url ${productrepo}
|
||||
git sparse-checkout init
|
||||
git sparse-checkout set meta/*
|
||||
git pull -t
|
||||
"""
|
||||
shatagmap.each { sha, tags ->
|
||||
sh """#!/bin/bash
|
||||
git checkout ${sha}
|
||||
"""
|
||||
def productreleasemeta = meta.importrelated(false, productreleasefolder)
|
||||
|
||||
if (!productvariant) {
|
||||
productvariant = productreleasemeta.productvariant()
|
||||
pp = addProductEntry(products,
|
||||
productvariant, productrepo)
|
||||
}
|
||||
|
||||
def productrelease = new ProductRelease(sha,
|
||||
productreleasemeta.jenkinsbuildinfo.builddate,
|
||||
tags)
|
||||
parseproductdependencies(products,
|
||||
productreleasemeta,
|
||||
productreleasefolder,
|
||||
productvariant,
|
||||
productrelease)
|
||||
pp.addProductRelease(productrelease)
|
||||
}
|
||||
|
||||
def productrelease = new ProductRelease(sha,
|
||||
productreleasemeta.jenkinsbuildinfo.builddate,
|
||||
tags)
|
||||
parseproductdependencies(products,
|
||||
productreleasemeta,
|
||||
productreleasefolder,
|
||||
productvariant,
|
||||
productrelease)
|
||||
pp.addProductRelease(productrelease)
|
||||
}
|
||||
pp.markparsed()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue