Update Jenkinsfile

This commit is contained in:
Nana Janashia
2020-11-05 17:47:23 +00:00
parent e0be3b5f9d
commit 273c10f041

33
Jenkinsfile vendored
View File

@@ -1,39 +1,44 @@
def gv
pipeline {
agent any
parameters {
choice(name: 'VERSION', choices: ['1.1.0', '1.2.0', '1.3.0'], description: '')
booleanParam(name: 'executeTests', defaultValue: true, description: '')
}
stages {
stage("build") {
stage("init") {
steps {
echo 'building the application...'
script {
gv = load "script.groovy"
}
}
}
stage("build") {
steps {
script {
gv.buildApp()
}
}
}
stage("test") {
when {
expression {
params.executeTests
}
}
steps {
echo 'testing the application...'
script {
gv.testApp()
}
}
}
stage("deploy") {
steps {
echo 'deplying the application...'
echo "deploying version ${params.VERSION}"
script {
gv.deployApp()
}
}
}
}
}