2017-07-21 7 views

答えて

1

それは(私はそれがほとんどオフしたマルチラインsh構文だったと思う)、このようなものだ:

pipeline { 
    agent { label 'docker' } 
    parameters { 
     string(name: 'flag', defaultValue: 'stop', description: 'How should I greet the world?') 
    } 
    stages { 
     stage('Example') { 
      steps { 
       checkout scm 
       sh "echo \"Current Branch: ${env.BRANCH_NAME}.... \"" 
       sh """ 
        if [[ "${params.flag}" == "run" ]]; then 
         echo "something" 
        fi 
       """ 
      } 
     } 
    } 
} 
関連する問題