Handle the situation where a build does not provide a remoteurl.txt file
This commit is contained in:
parent
7c2c9b22a1
commit
97e0d040ef
1 changed files with 9 additions and 1 deletions
|
|
@ -33,10 +33,18 @@ def combineSubjobVersions(versionLabelPrefix, versionFolderList, outputFolder =
|
|||
|
||||
buildStampFile = "${versionFolder}/buildstamp.txt"
|
||||
buildStampFileContents = readFile "${buildStampFile}"
|
||||
|
||||
remoteurlFile = "${versionFolder}/remoteurl.txt"
|
||||
remoteurlFileContents = readFile "${remoteurlFile}"
|
||||
if (fileExists("${remoteurlFile}")) {
|
||||
remoteurlFileContents = readFile "${remoteurlFile}"
|
||||
}
|
||||
else {
|
||||
remoteurlFileContents = 'Unknown'
|
||||
}
|
||||
|
||||
gitRevisionFile = "${versionFolder}/gitrevision.txt"
|
||||
gitRevisionFileContents = readFile "${gitRevisionFile}"
|
||||
|
||||
metabuildStampFile = "${OF}/buildstamps.txt"
|
||||
metabuildStampFileContents = readFile "${metabuildStampFile}"
|
||||
writeFile file: "${metabuildStampFile}", text: metabuildStampFileContents + "\r\n" + "${versionFolder}" + ":" + buildStampFileContents + "," + remoteurlFileContents + "," + gitRevisionFileContents
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue