詹金斯管道错误

时间:2017-03-30 19:42:45

标签: 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'


    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
  }
}

1 个答案:

答案 0 :(得分:0)

没关系。脚本很好。我在构建步骤中注入了env变量。我删除了它,现在它正在工作。