Commit 941acb2e authored by Robert Schmidt's avatar Robert Schmidt

Tag cluster images with branch and commit ID

parent 7361c168
...@@ -214,7 +214,7 @@ class Cluster: ...@@ -214,7 +214,7 @@ class Cluster:
forceBaseImageBuild = False forceBaseImageBuild = False
imageTag = 'develop' imageTag = 'develop'
if self.ranAllowMerge: # merging MR branch into develop -> temporary image if self.ranAllowMerge: # merging MR branch into develop -> temporary image
imageTag = 'ci-temp' imageTag = f'{self.ranBranch}-{self.ranCommitID[0:8]}'
if self.ranTargetBranch == 'develop': if self.ranTargetBranch == 'develop':
ret = self.cmd.run(f'git diff HEAD..origin/develop -- cmake_targets/build_oai cmake_targets/tools/build_helper docker/Dockerfile.base.rhel8.2 | grep --colour=never -i INDEX') ret = self.cmd.run(f'git diff HEAD..origin/develop -- cmake_targets/build_oai cmake_targets/tools/build_helper docker/Dockerfile.base.rhel8.2 | grep --colour=never -i INDEX')
result = re.search('index', ret.stdout) result = re.search('index', ret.stdout)
......
...@@ -105,7 +105,7 @@ class PhySim: ...@@ -105,7 +105,7 @@ class PhySim:
if self.ranCommitID != '': if self.ranCommitID != '':
mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 30) mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 30)
if self.ranAllowMerge: if self.ranAllowMerge:
imageTag = "ci-temp" imageTag = f'{self.ranBranch}-{self.ranCommitID[0:8]}'
if self.ranTargetBranch == '': if self.ranTargetBranch == '':
if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'): if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'):
mySSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 30) mySSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 30)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment