From e0be3b5f9d082440cb7a809db187b1ff35525407 Mon Sep 17 00:00:00 2001 From: Nana Janashia Date: Thu, 5 Nov 2020 17:23:39 +0000 Subject: [PATCH] Update Jenkinsfile --- Jenkinsfile | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index aae046b..89cf390 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,26 +1,39 @@ 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") { - + steps { echo 'building the application...' } } + stage("test") { - + + when { + expression { + params.executeTests + } + } steps { echo 'testing the application...' } } + stage("deploy") { - + steps { - echo 'deploying the application...' + echo 'deplying the application...' + echo "deploying version ${params.VERSION}" } } } } +