Jenkins 詹金斯管道错误

Jenkins 詹金斯管道错误,jenkins,groovy,jenkins-pipeline,Jenkins,Groovy,Jenkins Pipeline,我在Jenkins中使用管道插件,但无法运行shell命令。我收到以下错误: [develop - pipeline] Running shell script nohup: failed to run command ‘sh’: No such file or directory 该节点是一个Ubuntu实例 node ('aws-ondemand') { //println env.BUILD_NUMBER try { stage 'Checkout and Build'

我在Jenkins中使用管道插件,但无法运行shell命令。我收到以下错误:

[develop - pipeline] Running shell script
nohup: failed to run command ‘sh’: No such file or directory
该节点是一个Ubuntu实例

node ('aws-ondemand') {

//println env.BUILD_NUMBER


try {
    stage 'Checkout and Build'


    git url: 'git@github.com:MyAndroidRepo.git',
    branch: 'develop'
    sh 'git submodule init'
    sh 'git submodule update'
    sh './gradlew clean build'

}catch (e) {
    //currentBuild.result = "FAILED"
    //notifyFailed()
    throw e
  }
}

别客气。剧本很好。我在构建步骤中注入了env变量。我移除了它,现在它可以工作了