Update Jenkinsfile
This commit is contained in:
23
Jenkinsfile
vendored
23
Jenkinsfile
vendored
@@ -1,21 +1,32 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent none
|
agent none
|
||||||
stages {
|
stages {
|
||||||
|
stage('test') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
echo "Testing the application..."
|
||||||
|
echo "Executing pipeline for branch $BRANCH_NAME"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
stage('build') {
|
stage('build') {
|
||||||
|
when {
|
||||||
|
expression {
|
||||||
|
BRANCH_NAME == 'master'
|
||||||
|
}
|
||||||
|
}
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
echo "Building the application..."
|
echo "Building the application..."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('test') {
|
stage('deploy') {
|
||||||
steps {
|
when {
|
||||||
script {
|
expression {
|
||||||
echo "Testing the application..."
|
BRANCH_NAME == 'master'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
stage('deploy') {
|
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
echo "Deploying the application..."
|
echo "Deploying the application..."
|
||||||
|
|||||||
Reference in New Issue
Block a user