CI: Allow ranCommitID to be "develop"
This will be used to pull images with the tag "develop" (i.e., without a commit ID).
This commit is contained in:
committed by
Robert Schmidt
parent
5730df9ffc
commit
df9aec167e
@@ -153,7 +153,7 @@ pipeline {
|
|||||||
if (eNB_AllowMergeRequestProcess) {
|
if (eNB_AllowMergeRequestProcess) {
|
||||||
sh "git fetch"
|
sh "git fetch"
|
||||||
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest"
|
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest"
|
||||||
} else {
|
} else if (eNB_CommitID != 'develop') {
|
||||||
sh "git fetch"
|
sh "git fetch"
|
||||||
sh "git checkout -f ${eNB_CommitID}"
|
sh "git checkout -f ${eNB_CommitID}"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,6 +70,8 @@ def CreateWorkspace(host, sourcePath, ranRepository, ranCommitID, ranTargetBranc
|
|||||||
return ret.returncode == 0
|
return ret.returncode == 0
|
||||||
|
|
||||||
def CreateTag(ranCommitID, ranBranch, ranAllowMerge):
|
def CreateTag(ranCommitID, ranBranch, ranAllowMerge):
|
||||||
|
if ranCommitID == 'develop':
|
||||||
|
return 'develop'
|
||||||
shortCommit = ranCommitID[0:8]
|
shortCommit = ranCommitID[0:8]
|
||||||
if ranAllowMerge:
|
if ranAllowMerge:
|
||||||
# Allowing contributor to have a name/branchName format
|
# Allowing contributor to have a name/branchName format
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ class HTMLManagement():
|
|||||||
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-tag"></span> Commit ID </td>\n')
|
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-tag"></span> Commit ID </td>\n')
|
||||||
self.htmlFile.write(' <td>' + self.ranCommitID + '</td>\n')
|
self.htmlFile.write(' <td>' + self.ranCommitID + '</td>\n')
|
||||||
self.htmlFile.write(' </tr>\n')
|
self.htmlFile.write(' </tr>\n')
|
||||||
if self.ranAllowMerge != '':
|
if self.ranAllowMerge != '' and self.ranCommitID != 'develop':
|
||||||
commit_message = subprocess.check_output("git log -n1 --pretty=format:\"%s\" " + self.ranCommitID, shell=True, universal_newlines=True)
|
commit_message = subprocess.check_output("git log -n1 --pretty=format:\"%s\" " + self.ranCommitID, shell=True, universal_newlines=True)
|
||||||
commit_message = commit_message.strip()
|
commit_message = commit_message.strip()
|
||||||
self.htmlFile.write(' <tr>\n')
|
self.htmlFile.write(' <tr>\n')
|
||||||
|
|||||||
Reference in New Issue
Block a user