Skip to content

Commit b109f5c

Browse files
author
Michael Sauter
authored
Merge pull request #52 from opendevstack/fix/tag-image-in-cd-project
Update Jenkinsfile
2 parents 9555a71 + a925ee7 commit b109f5c

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

Jenkinsfile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,14 @@ library("ods-jenkins-shared-library@${odsGitRef}")
1111

1212
odsComponentPipeline(
1313
imageStreamTag: "${odsNamespace}/jenkins-agent-maven:${odsImageTag}",
14-
branchToEnvironmentMapping: [
15-
'*' : 'dev',
16-
"${odsGitRef}" : 'test'
17-
],
14+
branchToEnvironmentMapping: [:],
1815
debug: true,
1916
resourceRequestMemory: '3Gi',
2017
resourceLimitMemory: '3Gi'
2118
) { context ->
2219
stageBuild(context)
2320
odsComponentStageScanWithSonar(context, [branch: '*'])
24-
odsComponentStageBuildOpenShiftImage(context)
21+
odsComponentStageBuildOpenShiftImage(context, [branch: '*'])
2522
stageCreatedImageTagLatest(context)
2623
}
2724

@@ -67,7 +64,7 @@ def stageCreatedImageTagLatest(def context) {
6764
stage('Tag created image') {
6865
def targetImageTag = context.gitBranch.replace('/','_').replace('-','_')
6966
sh(
70-
script: "oc -n ${context.targetProject} tag ${context.componentId}:${context.shortGitCommit} ${context.componentId}:${targetImageTag}",
67+
script: "oc -n ${context.cdProject} tag ${context.componentId}:${context.shortGitCommit} ${context.componentId}:${targetImageTag}",
7168
label: "Set tag '${targetImageTag}' on is/${context.componentId}"
7269
)
7370
}

0 commit comments

Comments
 (0)