Skip to content

Conversation

@vikrantsnirban
Copy link

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did - To add JNLP support to Plugin
  • Link to relevant issues in GitHub or Jira - https://github.com/vikrantsnirban/google-compute-engine-plugin
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes to this file do not belong here.

<f:entry title="${%No delay provisioning}" field="noDelayProvisioning">
<f:checkbox/>
</f:entry>
<f:entry title="${%JNLP Support}" field="jnlpSupport">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not use the JNLP term in conjunction with Jenkins going forward; it has not actually used JNLP for years. Just refer to inbound agents (which may use either TCP or WebSocket transport).

Comment on lines 320 to 332
log.info("Adding JNLP Meta Data " + METADATA_CONTROLLER_URL + " = " + Jenkins.get().getRootUrl());

items.add(
new Metadata.Items()
.setKey(METADATA_CONTROLLER_URL)
.setValue(Jenkins.get().getRootUrl()));

log.info("Adding JNLP Meta Data " + METADATA_JNLP_SECRET + " = " + JnlpAgentReceiver.SLAVE_SECRET.mac(instance.getName()));

items.add(
new Metadata.Items()
.setKey(METADATA_JNLP_SECRET)
.setValue(JnlpAgentReceiver.SLAVE_SECRET.mac(instance.getName())));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the agent name?

Comment on lines 351 to 352
JNLPLauncher jnlpLauncher = new JNLPLauncher(true);
jnlpLauncher.setWebSocket(true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deprecated calls. Selection of transport and all other options is now left to the agent startup script.

-->
By default Jenkins use SSH to connect cloud nodes.
With this option enabled, a new node is created on GCP and will be connected using JNLP Protocol.
User needs to setup start-up script for Nodes to connect to master.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You would need to document what environment variables (?) are exposed for the controller URL, agent name, and secret.


private transient volatile ComputeClient client;
private boolean noDelayProvisioning;
private boolean jnlpSupport;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#312 (comment) similarly in the PR title, variable names, etc.

@vikrantsnirban
Copy link
Author

Raised Fresh PR with latest Pull Refresh
#525 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants