Skip to content
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

Fix hostname resolution in recent Jenkins versions #326

Merged
merged 4 commits into from
Feb 10, 2023

Conversation

albertvaka
Copy link
Collaborator

What does this PR do?

The main worker got renamed from "master" to "built-in" in recent Jenkins versions. Adds support for both names.

Review checklist (to be filled by reviewers)

  • Feature or bug fix MUST have appropriate tests (unit, integration, etc...)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have one changelog/ label attached. If applicable it should have the backward-incompatible label attached.
  • PR should not have do-not-merge/ label attached.
  • If Applicable, issue must have kind/ and severity/ labels attached at least.

The main worker got renamed from "master" to "built-in".
@@ -70,7 +70,7 @@ protected Set<String> getNodeLabels(Run<?,?> run, final String nodeName) {

// If there is no labels and the node name is master,
// we force the label "master".
if("master".equalsIgnoreCase(nodeName)){
if("master".equalsIgnoreCase(nodeName) || "built-in".equalsIgnoreCase(nodeName)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could it be worth it to have this method in a utility method. It seems we're repeating the same checks multiple times

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

@albertvaka albertvaka merged commit c8c9b3f into master Feb 10, 2023
@albertvaka albertvaka deleted the albertvaka/support-node-name-built-in branch February 10, 2023 11:18
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