39 lines
884 B
Groovy
39 lines
884 B
Groovy
@Library('jenkins-shared-library')_
|
|
|
|
pipeline {
|
|
agent none
|
|
stages {
|
|
stage('test') {
|
|
steps {
|
|
echo "Testing the application..."
|
|
echo "Executing pipeline for branch $BRANCH_NAME"
|
|
buildJar
|
|
}
|
|
}
|
|
stage('build') {
|
|
when {
|
|
expression {
|
|
BRANCH_NAME == 'master'
|
|
}
|
|
}
|
|
steps {
|
|
script {
|
|
echo "Building the application..."
|
|
}
|
|
}
|
|
}
|
|
stage('deploy') {
|
|
when {
|
|
expression {
|
|
BRANCH_NAME == 'master'
|
|
}
|
|
}
|
|
steps {
|
|
script {
|
|
echo "Deploying the application..."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|