From 1ea75355b9d429ad4a4c222a9b27fbf06e5c256d Mon Sep 17 00:00:00 2001 From: yuxh Date: Fri, 2 Apr 2021 11:19:22 +0800 Subject: [PATCH] no message --- Jenkinsfile | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 33b8669..f52fcef 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,23 +5,23 @@ pipeline { agent any - environment{ - hello= 'hello' + environment { + hello = 'hello' - world="""${sh(returnStatus:true, - script:'"world"')} -""" + world = """${sh(returnStatus: true, + script: '"world"')} + """ } stages { - stage('echo'){ - steps{ - script{ - def singlyQuoted='hello' - def doublyQuoted="world" - echo 'hello mr. ${singlyQuoted}' + stage('echo') { + steps { + script { + def singlyQuoted = 'hello' + def doublyQuoted = "world" + echo "hello mr. ${singlyQuoted}" echo "i said hello mr. ${doublyQuoted}" } echo "${hello}" @@ -30,10 +30,10 @@ pipeline { } } - stage('read environment'){ - steps{ + stage('read environment') { + steps { echo "${env.BUILD_ID}" - echo '---------------------------' + echo "---------------------------" // echo ${env.BUILD_ID} } } @@ -59,7 +59,7 @@ pipeline { stage('deploy') { steps { - echo 'deploy...' + echo "${version}_${env.BUILD_ID}deploy..." } } -- GitLab