-
Notifications
You must be signed in to change notification settings - Fork 695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JENKINS-69304] Allow specifying a java path #766
[JENKINS-69304] Allow specifying a java path #766
Conversation
final String jvmopts = node.jvmopts; | ||
final String remoteFS = WindowsUtil.quoteArgument(node.getRemoteFS()); | ||
final String workDir = Util.fixEmptyAndTrim(remoteFS) != null ? remoteFS : tmpDir; | ||
final String launchString = "java " + (jvmopts != null ? jvmopts : "") + " -jar " + tmpDir + AGENT_JAR + " -workDir " + workDir; | ||
final String launchString = javaPath + " " + (jvmopts != null ? jvmopts : "") + " -jar " + tmpDir + AGENT_JAR + " -workDir " + workDir; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: unlike the Mac & Unix versions, this launcher doesn't allow specifying command prefix
or suffix
@@ -510,6 +520,7 @@ public SlaveTemplate(String ami, String zone, SpotConfiguration spotConfig, Stri | |||
monitoring, t2Unlimited, ConnectionStrategy.backwardsCompatible(usePrivateDnsName, connectUsingPublicIp, associatePublicIp), -1); | |||
} | |||
|
|||
@Deprecated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added these @Deprecated
annotations to what seem to me similar deprecated constructors. (I might be wrong)
@fcojfernandez would you have time to review this? Thanks. |
Manually tested an incremental on infra.ci.jenkins.io ✅ |
* chore: try ec2-plugin with `javaPath` option Ref: jenkinsci/ec2-plugin#766 * include last fix and dependencies needed for this incremental ec2-plugin version (https://plugins.jenkins.io/ec2/#dependencies) * remove plugins already present * fix bounty-castle dependency Plugin workflow-basic-steps:991.v43d80fea_ff66 (via mailer:438.v02c7f0a_12fa_4->instance-identity:116.vf8f487400980) depends on bouncycastle-api:2.26, but there is an older version defined on the top level - bouncycastle-api:2.25 * fix more dependencies * fix incremental syntax * no .workflow (?) * add missing incremental branch ref * drop ec2 prefix from the incremental version Co-authored-by: Devin Nusbaum <dwnusbaum@users.noreply.github.com> * more dependency fixes Co-authored-by: Devin Nusbaum <dwnusbaum@users.noreply.github.com>
Should fix Windows (which can't have command prefix) Ref: - jenkinsci/ec2-plugin#766 - jenkins-infra/helpdesk#3090 - jenkins-infra/docker-jenkins-weeklyci#565
* fix: use ec2-plugin 'javaPath' option instead of command prefix Should fix Windows (which can't have command prefix) Ref: - jenkinsci/ec2-plugin#766 - jenkins-infra/helpdesk#3090 - jenkins-infra/docker-jenkins-weeklyci#565 * fix: use slash instead of antislash for Windows paths * add missing .exe extension for the Windows javaPath
As jenkinsci/ec2-plugin#766 has been merged, this PR revert the incremental introduced in #565
Hi, all very nice. But if you keep 'javaPath' empty (like me) I expect the system does a 'which java' to selfdetect the java binary. |
Has the 2.0.1 version resolved this for you? |
Yes it did. Thanks for the quick fix. |
…ins-infra#2721) * fix: use ec2-plugin 'javaPath' option instead of command prefix Should fix Windows (which can't have command prefix) Ref: - jenkinsci/ec2-plugin#766 - jenkins-infra/helpdesk#3090 - jenkins-infra/docker-jenkins-weeklyci#565 * fix: use slash instead of antislash for Windows paths * add missing .exe extension for the Windows javaPath
…ins-infra#2721) * fix: use ec2-plugin 'javaPath' option instead of command prefix Should fix Windows (which can't have command prefix) Ref: - jenkinsci/ec2-plugin#766 - jenkins-infra/helpdesk#3090 - jenkins-infra/docker-jenkins-weeklyci#565 * fix: use slash instead of antislash for Windows paths * add missing .exe extension for the Windows javaPath
Cf https://issues.jenkins.io/browse/JENKINS-69304 and jenkins-infra/helpdesk#3090, this PR add a "javaPath" option.