Skip to content

Commit

Permalink
Print deprecation warning when using -jnlpUrl (#8773)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil committed Dec 13, 2023
1 parent 24dd6c2 commit 05037a0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions core/src/main/java/hudson/slaves/SlaveComputer.java
Expand Up @@ -877,6 +877,12 @@ public HttpResponse doSlaveAgentJnlp(StaplerRequest req, StaplerResponse res) {

@WebMethod(name = "jenkins-agent.jnlp")
public HttpResponse doJenkinsAgentJnlp(StaplerRequest req, StaplerResponse res) {
LOGGER.log(
Level.WARNING,
"Agent \"" + getName()
+ "\" is connecting with the \"-jnlpUrl\" argument, which is deprecated."
+ " Use \"-url\" and \"-name\" instead, potentially also passing in"
+ " \"-webSocket\", \"-tunnel\", and/or work directory options as needed.");
return new EncryptedSlaveAgentJnlpFile(this, "jenkins-agent.jnlp.jelly", getName(), CONNECT);
}

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -86,7 +86,7 @@ THE SOFTWARE.
<changelog.url>https://www.jenkins.io/changelog</changelog.url>

<!-- Bundled Remoting version -->
<remoting.version>3192.v713e3b_039fb_e</remoting.version>
<remoting.version>3198.v03a_401881f3e</remoting.version>
<!-- Minimum Remoting version, which is tested for API compatibility -->
<remoting.minimum.supported.version>4.13</remoting.minimum.supported.version>

Expand Down

0 comments on commit 05037a0

Please sign in to comment.