在Groovy,Jenkins中运行curl sh命令后语句未执行

时间:2018-11-16 13:04:50

标签: curl jenkins groovy jenkins-pipeline

def url = "https://<someURL>"
def command =  "CURL -X GET -u "+ url 
println "Going to run " + command
def comment_text = sh script: command, returnStatus: true
println comment_text
println comment_text.getClass()
println "hello world, how are you doing today?"

我得到了CURL命令的输出,但是之后的所有打印语句都没有执行。不过,该作业已成功完成。

执行命令前的行是

Going to run CURL -X GET <url>
[Pipeline] sh
[<some identifier>] Running shell script <shell script here>

执行和打印CURL结果后的最后几行是

[Pipeline] }
[Pipeline] // timeout
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline

GitHub has been notified of this commit’s build result

Finished: SUCCESS

0 个答案:

没有答案