Revert "Use the jenkins pipeline checkout mechanism for getting release and source repo"
This reverts commit 6808492ff5bc48c3e5d6a3e4239c0c46b9d0145e.
This commit is contained in:
parent
67785ac859
commit
fb7953a959
1 changed files with 22 additions and 3 deletions
|
|
@ -10,7 +10,6 @@ tempfolder = "${WORKSPACE}/temp"
|
|||
gitrevparseoutputfile = "${tempfolder}/gitrevparse.out"
|
||||
|
||||
metascript = autobuilder.getmetafolderscript()
|
||||
gh = load("${autobuilder.commonscripts()}/versioncontrol/git.groovy")
|
||||
|
||||
def resetfolders() {
|
||||
dir(summaryfolder) {
|
||||
|
|
@ -58,7 +57,7 @@ def checkoutreleaserepo(buildmeta, String checkoutfolder) {
|
|||
// Get the latest head revision of the release repo without checking out working copy; Check out to a folder unique to component; Extract any meta
|
||||
def previousreleasemeta = buildmeta.getNewMetaObject(this)
|
||||
dir(releaserepofolder) {
|
||||
gh.gitCheckout(releaserepo, '*/master', checkoutfolder, "", 1, false)
|
||||
sh("git clone ${releaserepo} ${checkoutfolder}")
|
||||
}
|
||||
previousreleasemeta = getpreviousreleasemeta(buildmeta, checkoutfolder)
|
||||
dir(checkoutfolder) {
|
||||
|
|
@ -70,7 +69,27 @@ def checkoutreleaserepo(buildmeta, String checkoutfolder) {
|
|||
|
||||
def checkoutsourcerepo(buildmeta, String checkoutfolder) {
|
||||
def String sourcerepo = buildmeta.gitinfo.remoteurl
|
||||
gh.gitCheckout(sourcerepo, '*/master', checkoutfolder, "", 1, false)
|
||||
if (sourcerepo) {
|
||||
// Get the latest revision of the source repo without checking out working copy; Check out to a folder unique to component
|
||||
if (fileExists(checkoutfolder)) {
|
||||
dir(checkoutfolder) {
|
||||
sh("""
|
||||
git reset --hard
|
||||
git clean -fdx
|
||||
git pull
|
||||
# Remove all tags that are not already on the remote
|
||||
git tag -l | xargs git tag -d >/dev/null
|
||||
git fetch -t >/dev/null
|
||||
"""
|
||||
)
|
||||
}
|
||||
}
|
||||
else {
|
||||
dir(sourcerepofolder) {
|
||||
sh("git clone ${sourcerepo} ${checkoutfolder}")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def getcomponentartifacts(toplevelbuildmeta, buildinfo, String repofolder, String tempfolder) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue