Add new file

This commit is contained in:
Nana Janashia
2021-01-01 17:11:02 +00:00
parent 6d2354c4e9
commit 51d6d268c8

49
Jenkinsfile-syntax/Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,49 @@
#!/usr/bin/env groovy
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("init") {
steps {
script {
gv = load "script.groovy"
}
}
}
stage("build") {
steps {
script {
gv.buildApp()
}
}
}
stage("test") {
when {
expression {
params.executeTests
}
}
steps {
script {
gv.testApp()
}
}
}
stage("deploy") {
steps {
script {
env.ENV = input message: "Select the environment to deploy to", ok: "Done", parameters: [choice(name: 'ONE', choices: ['dev', 'staging', 'prod'], description: '')]
gv.deployApp()
echo "Deploying to ${ENV}"
}
}
}
}
}