Update Jenkinsfile

This commit is contained in:
Nana Janashia
2020-11-07 17:43:18 +00:00
parent a71dd16df8
commit eea2109d66

11
Jenkinsfile vendored
View File

@@ -9,28 +9,21 @@ pipeline {
stage('test') { stage('test') {
steps { steps {
script { script {
echo "Testing the application..."
// echo "Executing pipeline for branch $BRANCH_NAME"
buildJar() buildJar()
} }
} }
} }
stage('build') { stage('build') {
when {
expression {
BRANCH_NAME == 'master'
}
}
steps { steps {
script { script {
echo "Building the application..." buildDockerImage 'nanajanashia/demo-app:jma-2.0'
} }
} }
} }
stage('deploy') { stage('deploy') {
when { when {
expression { expression {
BRANCH_NAME == 'master' BRANCH_NAME == 'master'
} }
} }
steps { steps {