Jenkins CLI `install-plugin` with short name fails
SnowCait opened this issue · 1 comments
SnowCait commented
Jenkins and plugins versions report
Environment
Jenkins: 2.332.3
OS: Linux - 5.10.102.1-microsoft-standard-WSL2
---
apache-httpcomponents-client-4-api:4.5.13-1.0
caffeine-api:2.9.3-65.v6a_47d0f4d1fe
command-launcher:84.v4a_97f2027398
display-url-api:2.3.6
durable-task:496.va67c6f9eefa7
javax-activation-api:1.2.0-2
javax-mail-api:1.6.2-6
jdk-tool:1.5
mailer:414.vcc4c33714601
script-security:1175.v4b_d517d6db_f0
sshd:3.237.v883d165a_c1d3
trilead-api:1.57.v6e90e07157e1
What Operating System are you using (both controller, and any agents involved in the problem)?
Windows in local.
Ubuntu in GitHub Actions.
Reproduction steps
$ docker run -d -p 8080:8080 -p 50000:50000 --restart=on-failure --env JAVA_OPTS="-Djenkins.install.runSetupWizard=false" jenkins/jenkins:lts-jdk11
$ sleep 20s # Wait for starting
$ wget http://localhost:8080/jnlpJars/jenkins-cli.jar
$ java -jar jenkins-cli.jar -s http://localhost:8080/ -webSocket install-plugin git -deploy
Expected Results
No error occurs and the plugin is installed.
Actual Results
Error occurs.
$ java -jar jenkins-cli.jar -s http://localhost:8080/ -webSocket install-plugin git -deploy
git is neither a valid file, URL, nor a plugin artifact name in the update center
ERROR: Error occurred, see previous output.
No update center data is retrieved yet from: https://updates.jenkins.io/update-center.json
git looks like a short plugin name. Did you mean ‘null’?
Full logs are here.
https://github.com/SnowCait/actions-sandbox/runs/6643750915?check_suite_focus=true
Anything else?
Jenkins CLI install-plugin
with short name fails since yesterday.
(install-plugin
with URL works fine.)
Update Center's URL seems to be moved.
$ curl -sS https://updates.jenkins.io/update-center.json
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://updates.jenkins.io/current/update-center.json">here</a>.</p>
</body></html>
Should this URL be changed?
Line 250 in d219f4e
- jenkinsUcJson=$(curl ${CURL_OPTIONS:--sSfL} -o /dev/null -w "%{url_effective}" "${JENKINS_UC}/update-center.json?version=${jenkinsVersion}")
+ jenkinsUcJson=$(curl ${CURL_OPTIONS:--sSfL} -o /dev/null -w "%{url_effective}" "${JENKINS_UC}/current/update-center.json?version=${jenkinsVersion}")
MarkEWaite commented
This may have been due to an update center outage. Thanks for reporting. I confirmed today that the commands you provided to duplicate the problem are working for me.