Update Jenkinsfile

This commit is contained in:
Nana Janashia
2020-11-06 12:49:54 +00:00
parent 3e129808aa
commit 9969d8b2cf

25
Jenkinsfile vendored
View File

@@ -1,21 +1,32 @@
pipeline { pipeline {
agent none agent none
stages { stages {
stage('build') {
steps {
script {
echo "Building the application..."
}
}
}
stage('test') { stage('test') {
steps { steps {
script { script {
echo "Testing the application..." echo "Testing the application..."
echo "Executing pipeline for branch $BRANCH_NAME"
}
}
}
stage('build') {
when {
expression {
BRANCH_NAME == 'master'
}
}
steps {
script {
echo "Building the application..."
} }
} }
} }
stage('deploy') { stage('deploy') {
when {
expression {
BRANCH_NAME == 'master'
}
}
steps { steps {
script { script {
echo "Deploying the application..." echo "Deploying the application..."