From df9aec167e05e75af28ea5f8417e227e6ceec272 Mon Sep 17 00:00:00 2001 From: Raphael Defosseux Date: Fri, 15 Nov 2024 09:56:35 +0100 Subject: [PATCH] CI: Allow ranCommitID to be "develop" This will be used to pull images with the tag "develop" (i.e., without a commit ID). --- ci-scripts/Jenkinsfile-tmp-ran | 2 +- ci-scripts/cls_containerize.py | 2 ++ ci-scripts/cls_oai_html.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ci-scripts/Jenkinsfile-tmp-ran b/ci-scripts/Jenkinsfile-tmp-ran index e1593d52a4..50e963e68b 100644 --- a/ci-scripts/Jenkinsfile-tmp-ran +++ b/ci-scripts/Jenkinsfile-tmp-ran @@ -153,7 +153,7 @@ pipeline { if (eNB_AllowMergeRequestProcess) { sh "git fetch" 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 checkout -f ${eNB_CommitID}" } diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index d5cd216be7..29f78ad6b0 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -70,6 +70,8 @@ def CreateWorkspace(host, sourcePath, ranRepository, ranCommitID, ranTargetBranc return ret.returncode == 0 def CreateTag(ranCommitID, ranBranch, ranAllowMerge): + if ranCommitID == 'develop': + return 'develop' shortCommit = ranCommitID[0:8] if ranAllowMerge: # Allowing contributor to have a name/branchName format diff --git a/ci-scripts/cls_oai_html.py b/ci-scripts/cls_oai_html.py index b2efcc66b7..8e99b20de7 100644 --- a/ci-scripts/cls_oai_html.py +++ b/ci-scripts/cls_oai_html.py @@ -147,7 +147,7 @@ class HTMLManagement(): self.htmlFile.write(' Commit ID \n') self.htmlFile.write(' ' + self.ranCommitID + '\n') self.htmlFile.write(' \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 = commit_message.strip() self.htmlFile.write(' \n')