一千萬個為什麽

搜索

為什麽jenkins-cli.jar linting功能不起作用?



jenkins-cli.jar已經下載。

它能夠運行。

When one tries to check the syntax of a jenkinsfile by running java -jar ~/Desktop/jenkins-cli.jar -s https:// -noCertificateCheck declarative-linter < Jenkinsfile it results in:

Sep 27, 2017 10:46:18 AM hudson.cli.CLI _main
INFO: Skipping HTTPS certificate checks altogether. Note that this is not secure at all.
Sep 27, 2017 10:46:34 AM hudson.cli.CLI$5 run
WARNING: null
java.io.IOException: Stream is closed
        at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.checkError(HttpURLConnection.java:3512)
        at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(HttpURLConnection.java:3486)
        at java.io.DataOutputStream.writeInt(DataOutputStream.java:197)
        at hudson.cli.PlainCLIProtocol$EitherSide.send(PlainCLIProtocol.java:188)
        at hudson.cli.PlainCLIProtocol$EitherSide.send(PlainCLIProtocol.java:195)
        at hudson.cli.PlainCLIProtocol$EitherSide$1.write(PlainCLIProtocol.java:215)
        at hudson.cli.CLI$5.run(CLI.java:699)

@Tensibai詢問是否存在身份驗證問題。身份驗證已完成,但尚不清楚是否成功:

$ java -jar ~/Desktop/jenkins-cli.jar -noCertificateCheck -s https:// login --username  --password 
Sep 27, 2017 10:57:17 AM hudson.cli.CLI _main
INFO: Skipping HTTPS certificate checks altogether. Note that this is not secure at all.

轉載註明原文: 為什麽jenkins-cli.jar linting功能不起作用?

一共有 1 個回答:

升級詹金斯後,問題解決了。事實證明,這個問題是與版本有關的。