Merge commit '7e5c624d72'
This commit is contained in:
commit
99d571ae92
4 changed files with 108 additions and 1 deletions
14
differences/dometahierarchy.groovy
Normal file
14
differences/dometahierarchy.groovy
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
def comparehierarchy(meta, String earlymetafolder, String latermetafolder, String maxdepth, String summaryfolder) {
|
||||
def int md = maxdepth.toInteger()
|
||||
|
||||
echo "Comparing product meta hierarchy from folders: ${earlymetafolder} and ${latermetafolder} to a depth of ${md}. Exporting summary to ${summaryfolder}"
|
||||
|
||||
def String summarystring = "No summary"
|
||||
def boolean markunstable = true
|
||||
def unstablereason = "No compare implementation yet"
|
||||
|
||||
return [summarystring, markunstable, unstablereason]
|
||||
}
|
||||
|
||||
return this;
|
||||
92
differences/metahierarchy.groovy
Normal file
92
differences/metahierarchy.groovy
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
pipeline {
|
||||
agent { label "${AGENT_LABEL}" }
|
||||
stages {
|
||||
stage('Initial setup') {
|
||||
steps {
|
||||
script {
|
||||
autobuilderscript = load("${WORKSPACE}/autobuild/Common_scripts/autobuilder.groovy")
|
||||
meta = autobuilderscript.startnonbuild(this)
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Clean exports') {
|
||||
steps {
|
||||
script {
|
||||
SUMMARYDIR = "${WORKSPACE}/summary"
|
||||
cleanfolders = [
|
||||
"${WORKSPACE}/build_artifacts",
|
||||
"${WORKSPACE}/early",
|
||||
"${WORKSPACE}/later",
|
||||
"${SUMMARYDIR}",
|
||||
]
|
||||
cleaner = load("${autobuilder.commonscripts()}/clean/clean.groovy")
|
||||
cleaner.clean(cleanfolders)
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Checkout top level meta') {
|
||||
steps {
|
||||
script {
|
||||
configurationhelper = autobuilder.configurationhelper()
|
||||
|
||||
SOURCEURL = TOP_LEVEL_META_REPOSITORY.trim()
|
||||
|
||||
EARLYREVISION = RELEASE_EARLY_REVISION.trim()
|
||||
EARLYROOTDIR = 'early'
|
||||
EARLYDIR = "${WORKSPACE}/${EARLYROOTDIR}"
|
||||
configurationhelper.gitCheckoutAndRegister(meta, EARLYROOTDIR, SOURCEURL, EARLYREVISION, EARLYDIR, EARLYROOTDIR, 0, false)
|
||||
|
||||
LATERREVISION = RELEASE_LATER_REVISION.trim()
|
||||
LATERROOTDIR = 'later'
|
||||
LATERDIR = "${WORKSPACE}/${LATERROOTDIR}"
|
||||
configurationhelper.gitCheckoutAndRegister(meta, LATERROOTDIR, SOURCEURL, LATERREVISION, LATERDIR, LATERROOTDIR, 0, false)
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Diff components') {
|
||||
steps {
|
||||
script {
|
||||
def comparator = load("${autobuilder.commonscripts()}/differences/dometahierarchy.groovy")
|
||||
(summarystring, markunstable, unstablereason) = comparator.comparehierarchy(meta, EARLYDIR, LATERDIR, MAX_META_DEPTH, SUMMARYDIR)
|
||||
if (markunstable) {
|
||||
env.unstablereason = unstablereason
|
||||
currentBuild.result = 'UNSTABLE'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Archiving artifacts') {
|
||||
steps {
|
||||
script {
|
||||
def artifactlist = meta.generateartifacts()
|
||||
archiveArtifacts "summary/**,${artifactlist}"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Summarise') {
|
||||
steps {
|
||||
script {
|
||||
echo "Summary:\n${summarystring}\n"
|
||||
if (env.unstablereason) {
|
||||
echo "Instability reason: ${env.unstablereason}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
echo 'Post-build'
|
||||
}
|
||||
failure {
|
||||
echo 'Failed build'
|
||||
}
|
||||
unstable {
|
||||
echo 'Unstable build'
|
||||
}
|
||||
success {
|
||||
echo 'Succeeded build'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -365,7 +365,7 @@ def releasecomponent(toplevelbuildmeta, buildinfo, String otherreleasetags, Stri
|
|||
}
|
||||
|
||||
def releasehierarchy(buildmeta, String maxdepth, String otherreleasetags, String dryrunpush) {
|
||||
int md = maxdepth.toInteger()
|
||||
def int md = maxdepth.toInteger()
|
||||
resetfolders()
|
||||
preconditions()
|
||||
|
||||
|
|
|
|||
|
|
@ -323,6 +323,7 @@ def stripgithistory(String rootfolder) {
|
|||
find . -name ".gitignore" | xargs -iXX rm -rf XX
|
||||
find . -name ".gitmodules" | xargs -iXX rm -rf XX
|
||||
find . -iname ".gitattributes" | xargs -iXX rm -rf XX
|
||||
find . -iname "*@tmp" | xargs -iXX rm -rf XX
|
||||
"""
|
||||
} else {
|
||||
echo "Not supporting git stripping in Windows at the moment"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue