簡體   English   中英

如何在 Jenkins 服務器上本地執行 groovy 腳本

[英]How to execute groovy script on Jenkins server locally

我已經安裝並運行了 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等接口,該怎么辦?

誰能幫我? 謝謝

嘗試使用:

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

歸功於cli ibook ,另見 http://localhost:8080/cli/command/groovy

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM