diff --git a/Jenkinsfile b/Jenkinsfile index 16520034f881f809f18d1ddb7b7fa99b6c41f912..674a3e6fd3c622caa15d7937db3b0294ba9d3030 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,10 +4,6 @@ pipeline { /* Jenkins为流水线分配一个执行器和工作区*/ agent any - script{ - def singlyQuoted='hello' - def doublyQuoted="world" - } @@ -16,8 +12,13 @@ pipeline { stage('echo'){ steps{ - echo 'hello mr. ${singlyQuoted}' - echo "i said hello mr. ${doublyQuoted}" + script{ + def singlyQuoted='hello' + def doublyQuoted="world" + echo 'hello mr. ${singlyQuoted}' + echo "i said hello mr. ${doublyQuoted}" + } + } }