Pass groovy variable to shell script

前端 未结 5 2133
没有蜡笔的小新
没有蜡笔的小新 2020-12-06 13:38

I just started learning groovy.I want to pass the svnSourcePath and svnDestPath to shell script in the svn copy command. But URL not rendered.

node {
 stage          


        
5条回答
  •  既然无缘
    2020-12-06 14:00

    only one time double quotes would also work

    stage('test') {  
      steps {  
        script {  
          for(job in env.JOB_NAMES.split(',')) {  
            println(job);  
            sh "bash jenkins/script.sh $job"  
            sh "echo $job"  
          }  
        }//end of script  
      }//end of steps  
    }//end of stage test
    

提交回复
热议问题