Skip to content

Commit

Permalink
Build number Signature master vs others
Browse files Browse the repository at this point in the history
  • Loading branch information
gajendran.c committed Jul 15, 2020
1 parent 70fd1cb commit 14d5fcc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion vars/buildPipeline.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,12 @@ spec:
throw new Exception("Working directory / dockerfile does not exist!");

String workDir = buildConfig.getWorkDir().replaceFirst(getCommonBasePath(buildConfig.getWorkDir(), buildConfig.getDockerFile()), "./")
String image = "${REPO_NAME}/${buildConfig.getImageName()}:v${scmVars.VERSION}-${scmVars.ACTUAL_COMMIT}";
String image = null;
if(scmVars.BRANCH.equalsIgnoreCase("master")) {
image = "${REPO_NAME}/${buildConfig.getImageName()}:v${scmVars.VERSION}-${scmVars.ACTUAL_COMMIT}";
} else {
image = "${REPO_NAME}/${buildConfig.getImageName()}:${scmVars.BRANCH}-${scmVars.ACTUAL_COMMIT}";
}
serviceCategory = buildConfig.getServiceCategoryName(); // Dashboard
buildNum = "${scmVars.VERSION}"; // Dashboard
String noPushImage = env.NO_PUSH ? env.NO_PUSH : false;
Expand Down

0 comments on commit 14d5fcc

Please sign in to comment.