Jenkins groovy pipeline - Need stdout of command from executing jar file

前端 未结 2 1260
梦毁少年i
梦毁少年i 2021-01-25 07:43

I am using Jenkins v:1.647 and the Pipeline plugin v: 1.14. My pipeline job pulls a groovy script which runs my orchestration. My issue is I have a executable jar that will perf

2条回答
  •  一生所求
    2021-01-25 08:10

    As of version 2.4 of Pipeline: Nodes and Processes it suffices to use:

    def out = sh script: 'java -jar scalr-api.jar testing654 n1-standard-8', returnStdout: true
    

提交回复
热议问题