Update Jenkinsfile
This commit is contained in:
27
Jenkinsfile
vendored
27
Jenkinsfile
vendored
@@ -1,26 +1,39 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
|
|
||||||
agent any
|
agent any
|
||||||
|
|
||||||
|
parameters {
|
||||||
|
choice(name: 'VERSION', choices: ['1.1.0', '1.2.0', '1.3.0'], description: '')
|
||||||
|
booleanParam(name: 'executeTests', defaultValue: true, description: '')
|
||||||
|
}
|
||||||
stages {
|
stages {
|
||||||
|
|
||||||
stage("build") {
|
stage("build") {
|
||||||
|
|
||||||
steps {
|
steps {
|
||||||
echo 'building the application...'
|
echo 'building the application...'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage("test") {
|
stage("test") {
|
||||||
|
|
||||||
|
when {
|
||||||
|
expression {
|
||||||
|
params.executeTests
|
||||||
|
}
|
||||||
|
}
|
||||||
steps {
|
steps {
|
||||||
echo 'testing the application...'
|
echo 'testing the application...'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage("deploy") {
|
stage("deploy") {
|
||||||
|
|
||||||
steps {
|
steps {
|
||||||
echo 'deploying the application...'
|
echo 'deplying the application...'
|
||||||
|
echo "deploying version ${params.VERSION}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user