We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 05bc521 commit a5a921cCopy full SHA for a5a921c
1 file changed
Jenkinsfile
@@ -44,7 +44,12 @@ pipeline {
44
script {
45
def jsonObj = readJSON text: env.IMG_BUILD_HOOKS
46
if (env.GIT_URL in jsonObj) {
47
- img_build_hook = jsonObj[env.GIT_URL]
+ echo "Build docker image"
48
+ if (env.BRANCH_NAME in jsonObj[env.GIT_URL]) {
49
+ img_build_hook = jsonObj[env.GIT_URL][env.BRANCH_NAME]
50
+ } else {
51
+ img_build_hook = jsonObj[env.GIT_URL]['default']
52
+ }
53
}
54
55
0 commit comments