【问题标题】:How to execute groovy script on Jenkins server locally如何在本地 Jenkins 服务器上执行 groovy 脚本
【发布时间】:2021-03-12 17:39:48
【问题描述】:

我已经安装并运行了我的 Jenkins,我尝试在我的本地 Jenkins 服务器上运行 Groovy 脚本:

java -jar jenkins-cli.jar  -s http://localhost:8080/ -auth admin:password groovy test.groovy

但我得到了:

ERROR: This command is requesting the -remoting mode which is no longer supported. See https://jenkins.io/redirect/cli-command-requires-channel

那么如果我想在Jenkins服务器本地执行一个Groovy脚本,而不是通过JENKINS_URL/script等接口,我该怎么办?

谁能帮帮我? 谢谢

【问题讨论】:

    标签: jenkins groovy jenkins-cli


    【解决方案1】:

    尝试使用:

    jar jenkins-cli.jar  -s http://localhost:8080/ -auth admin:password groovy = < test.groovy
    

    感谢cli ibook,另见http://localhost:8080/cli/command/groovy

    【讨论】:

      猜你喜欢
      • 2022-11-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-05-25
      相关资源
      最近更新 更多