Merge commit '859f90ea8e'
This commit is contained in:
commit
675a6b0abc
6 changed files with 31 additions and 53 deletions
|
|
@ -5,7 +5,7 @@ def registerConfigurationInfo(meta, String configurationName, String configurati
|
|||
}
|
||||
|
||||
def registerPipelineScriptConfiguration(meta) {
|
||||
registerConfigurationInfo(meta, 'pipeline script', '-', '-', gh.getGitInfo("${autobuilder.getautobuildpath()}"))
|
||||
registerConfigurationInfo(meta, 'pipeline script', '-', '-', gh.getGitInfo(autobuilder.getautobuildpath()))
|
||||
}
|
||||
|
||||
def gitCheckoutAndRegister(meta, String tool, String gitURL, String revision, String targetDir, String repoRoot = "", int cloneDepth = 1, boolean shallowClone = true, String filter = '') {
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
|
||||
def differences(meta, String sourcerevision, String previoussourcerevision, String sourcepath) {
|
||||
def String cs = autobuilder.commonscripts()
|
||||
def String difffile = meta.difffilepath()
|
||||
def String jirakey = meta.productinfo.jirakey
|
||||
if (isUnix()) {
|
||||
sh """
|
||||
"${PYTHON}" -u "${cs}/differences/show_release_differences.py" -g "${sourcepath}" -s "${sourcerevision}" -p "${previoussourcerevision}" -j "${jirakey}" -o "opposite notcommon" -f "${difffile}"
|
||||
"""
|
||||
}
|
||||
else {
|
||||
bat """
|
||||
"${PYTHON}" -u "${cs}\\differences\\show_release_differences.py" -g "${sourcepath}" -s "${sourcerevision}" -p "${previoussourcerevision}" -j "${jirakey}" -o "opposite notcommon" -f "${difffile}"
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
|
|
@ -51,7 +51,7 @@ def hierarchyartifactimportfromrepo(meta, String repo, String revision, String d
|
|||
def ArrayList<String> sparseitemlist = gh.convertSparseItemsString(filter)
|
||||
gh.gitCheckoutAlt(rooturl, rootrevision, destpath, "", 1, true, sparseitemlist)
|
||||
|
||||
def importedmeta = meta.importrelated(destpath)
|
||||
def importedmeta = meta.importrelated(destpath, rooturl, rootrevision, gh.getGitInfo(destpath))
|
||||
|
||||
relatedimportinfo = importedmeta.getassociated()
|
||||
echo "Cloning associated repos"
|
||||
|
|
@ -85,16 +85,16 @@ def hierarchyartifactimportfromrepo(meta, String repo, String revision, String d
|
|||
def artifactimportfromrepo(meta, String repo, String revision, String destpath, boolean incrementversionnumber = true, String filter = '', String excludes = '', boolean fingerprint = false) {
|
||||
def rooturl = repo.trim()
|
||||
def rootrevision = revision.trim()
|
||||
echo "Cloning root release repo: ${rooturl}, revision: ${rootrevision} at folder: ${destpath}"
|
||||
echo "Cloning release repo: ${rooturl}, revision: ${rootrevision} at folder: ${destpath}"
|
||||
|
||||
def ArrayList<String> sparseitemlist = gh.convertSparseItemsString(filter)
|
||||
gh.gitCheckoutAlt(rooturl, rootrevision, destpath, "", 1, true, sparseitemlist)
|
||||
|
||||
def importedmeta = meta.importrelated(destpath)
|
||||
def importedmeta = meta.importrelated(destpath, rooturl, rootrevision, gh.getGitInfo(destpath))
|
||||
|
||||
gh.stripgithistory(destpath)
|
||||
def metafilepath = "${destpath}/${meta.metafilepath()}"
|
||||
echo "Marking root meta as released and rewriting meta file: ${metafilepath}"
|
||||
echo "Marking meta as released and rewriting meta file: ${metafilepath}"
|
||||
rewritemetafileasreleased(importedmeta, metafilepath)
|
||||
|
||||
if (incrementversionnumber) {
|
||||
|
|
|
|||
|
|
@ -429,11 +429,8 @@ class PublishableInfo extends GISJsonSerialised {
|
|||
class MetaInfo extends GISJsonSerialised {
|
||||
private static String FORMAT = "0.1"
|
||||
private static String METAFOLDERNAME = "meta"
|
||||
private static String DIFFFOLDERNAME = "diff"
|
||||
private static String METAFILENAME = "info.json"
|
||||
private static String METADIFFFILENAME = "differences.txt"
|
||||
private static String METAARTIFACTS = "${METAFOLDERNAME}/**"
|
||||
private static String DIFFARTIFACTS = "${DIFFFOLDERNAME}/**"
|
||||
|
||||
class RelatedMetaInfo extends GISJsonSerialised {
|
||||
String offsetpath
|
||||
|
|
@ -514,6 +511,7 @@ class MetaInfo extends GISJsonSerialised {
|
|||
|
||||
void addConfigurationInfo(String configurationname, String configurationURL, String configurationversion, String configurationSHA) {
|
||||
def ConfigurationInfo ci = new ConfigurationInfo(script, configurationname, configurationURL, configurationversion, configurationSHA)
|
||||
script.echo("Adding configuration info: name: ${configurationname} url: ${configurationURL} version: ${configurationversion} sha: ${configurationSHA}")
|
||||
configurationinfo.add(ci)
|
||||
}
|
||||
|
||||
|
|
@ -607,11 +605,7 @@ class MetaInfo extends GISJsonSerialised {
|
|||
return METAFOLDERNAME + "/" + METAFILENAME
|
||||
}
|
||||
|
||||
static String difffilepath() {
|
||||
return DIFFFOLDERNAME + "/" + METADIFFFILENAME
|
||||
}
|
||||
|
||||
MetaInfo importrelated(String destpath) {
|
||||
MetaInfo importrelated(String destpath, String givenRepo = 'Unknown', String givenRevision = 'Unknown', String givenSHA = 'Unknown') {
|
||||
MetaInfo mi = new MetaInfo(script)
|
||||
|
||||
def String adjustedpath = relativize(destpath)
|
||||
|
|
@ -620,22 +614,12 @@ class MetaInfo extends GISJsonSerialised {
|
|||
mi.deserialiseJson(importedmetafile)
|
||||
} else {
|
||||
script.echo("Could not deserialise meta at file: ${importedmetafile} (destpath: ${destpath})- Does not exist")
|
||||
mi.addConfigurationInfo('', givenRepo, givenRevision, givenSHA)
|
||||
}
|
||||
|
||||
RelatedMetaInfo rmi = new RelatedMetaInfo(script, adjustedpath, mi)
|
||||
associatedmeta.add(rmi)
|
||||
|
||||
def importedmetadifffile = adjustedpath + "/" + difffilepath()
|
||||
if (script.fileExists(importedmetadifffile)) {
|
||||
def String newcontents = script.readFile(file: importedmetadifffile)
|
||||
def String currentcontents = ""
|
||||
if (script.fileExists(difffilepath())) {
|
||||
currentcontents = script.readFile(file: difffilepath())
|
||||
}
|
||||
|
||||
script.writeFile(file: difffilepath(), text: currentcontents + "\n" + mi.productinfo.productname + " " + mi.productinfo.subcomponentname + ":\n" + newcontents)
|
||||
}
|
||||
|
||||
return mi
|
||||
}
|
||||
|
||||
|
|
@ -660,15 +644,11 @@ class MetaInfo extends GISJsonSerialised {
|
|||
return METAFOLDERNAME
|
||||
}
|
||||
|
||||
static String difffolder() {
|
||||
return DIFFFOLDERNAME
|
||||
}
|
||||
|
||||
String generateartifacts(ArrayList<String> releasedfromhere = new ArrayList<String>(), // These items are recorded in meta as released from here
|
||||
ArrayList<String> releasedfromsubmeta = new ArrayList<String>(), // These items are not recorded in meta as released from here
|
||||
String metafilepath ="${METAFOLDERNAME}/${METAFILENAME}"
|
||||
) {
|
||||
def String artifactlist = "${METAARTIFACTS},${DIFFARTIFACTS}"
|
||||
def String artifactlist = METAARTIFACTS
|
||||
releaseinfo.addReleaseItem(METAARTIFACTS)
|
||||
for (releaseitem in releasedfromhere) {
|
||||
artifactlist += "," + releaseitem
|
||||
|
|
@ -777,10 +757,6 @@ MetaInfo metareset(script) {
|
|||
deleteDir()
|
||||
}
|
||||
|
||||
dir(mi.difffolder()) {
|
||||
deleteDir()
|
||||
}
|
||||
|
||||
return mi
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,27 @@ pipeline {
|
|||
steps {
|
||||
script {
|
||||
gh = load("${autobuilder.commonscripts()}/versioncontrol/git.groovy")
|
||||
def releases = gh.gettaglist(SOURCEDIR)
|
||||
def allreleases = gh.gettaglist(SOURCEDIR)
|
||||
boolean filterredundantreleases =
|
||||
def releases = new ArrayList<String>()
|
||||
if (FILTER_REDUNDANT_RELEASES == 'false') {
|
||||
echo("Showing all releases")
|
||||
releases = allreleases
|
||||
} else {
|
||||
echo("Showing filtered releases")
|
||||
for (release in allreleases) {
|
||||
if (!release.toLowerCase().startsWith("superceded") &&
|
||||
!release.toLowerCase().startsWith("erroneous") &&
|
||||
!release.toLowerCase().startsWith("faulty") &&
|
||||
!release.toLowerCase().startsWith("ignore") &&
|
||||
!release.toLowerCase().startsWith("inmainline")) {
|
||||
//echo("Showing release: ${release}")
|
||||
releases.add(release)
|
||||
} else {
|
||||
//echo("Not showing release: ${release}")
|
||||
}
|
||||
}
|
||||
}
|
||||
timeout(time: 10, unit: 'MINUTES') {
|
||||
release = input(
|
||||
message: 'Please select the software version',
|
||||
|
|
|
|||
|
|
@ -124,4 +124,4 @@ PublishableItemsSelection createItemSelector(
|
|||
return pis
|
||||
}
|
||||
|
||||
return this;
|
||||
return this;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue