Skip to content
Snippets Groups Projects
Commit 86c39a6f authored by Muhammad Suleman's avatar Muhammad Suleman
Browse files

Update Jenkinsfile

parent fec4f85e
Branches
No related merge requests found
......@@ -12,18 +12,17 @@ pipeline {
steps {
script {
def branchName = BRANCH_NAME
def buildNumber = BUILD_NUMBER
def imageName
echo branchName;
if (branchName == 'dev') {
imageName = 'sulemantalpur6/frontend:dev-${BUILD_NUMBER}'
imageName = 'sulemantalpur6/frontend:$branchName$buildNumber'
} else if (branchName == 'master') {
imageName = 'sulemantalpur6/frontend:master-${BUILD_NUMBER}'
imageName = 'sulemantalpur6/frontend:$branchName$buildNumber'
} else if (branchName == 'QA') {
imageName = 'sulemantalpur6/frontend:QA-${BUILD_NUMBER}'
imageName = 'sulemantalpur6/frontend:$branchName$buildNumber'
} else if (branchName == 'UAT') {
imageName = 'sulemantalpur6/frontend:UAT-${BUILD_NUMBER}'
imageName = 'sulemantalpur6/frontend:$branchName$buildNumber'
} else {
echo "Branch $branchName not configured for Docker image build."
currentBuild.result = 'FAILURE'
......
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