Skip to content

Conversation

@lemeurherve
Copy link
Member

@lemeurherve lemeurherve commented Jan 22, 2026

This change replaces the multiple if cases and the spotSelector function by a call to the infra.getAgentLabel global pipeline library function, as a centralised point to retrieve the appropriate agent template labels depending on the requested platform (no JDK implicated in those docker image builds), and on the controller where the job is running (ex: "fallback to from docker-highmem to linux" or "no spot/nonspot labels" on trusted.ci.jenkins.io).

Recommanded view: https://github.com/jenkinsci/docker-agents/pull/1137/changes?diff=split

Extracted from:

Refs:

Testing done

CI + infra.getBuildAgentLabel unit tests

image

Submitter checklist

  • 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
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

@lemeurherve lemeurherve added chore draft Not finalised/qualified/decided yet labels Jan 22, 2026
@lemeurherve lemeurherve force-pushed the use-a-switch-in-agentselector branch 2 times, most recently from fc1467f to 19426ec Compare January 22, 2026 21:23
@lemeurherve lemeurherve changed the title chore(pipeline): use a switch in agentLabelSelector chore(pipeline): use infra.getBuildAgentLabel Jan 22, 2026
@lemeurherve lemeurherve force-pushed the use-a-switch-in-agentselector branch 3 times, most recently from ba93953 to f7de2ce Compare January 22, 2026 21:53
@lemeurherve lemeurherve force-pushed the use-a-switch-in-agentselector branch from df90d51 to b8ed89c Compare January 23, 2026 15:09
@lemeurherve lemeurherve changed the title chore(pipeline): use infra.getBuildAgentLabel chore(pipeline): use infra.getBuildAgentLabel in agentSelector Jan 23, 2026
@lemeurherve lemeurherve force-pushed the use-a-switch-in-agentselector branch from 4fa1a13 to bf2ce89 Compare January 23, 2026 15:13
@lemeurherve lemeurherve marked this pull request as ready for review January 23, 2026 15:33
@lemeurherve lemeurherve requested a review from a team as a code owner January 23, 2026 15:33
@lemeurherve lemeurherve removed the draft Not finalised/qualified/decided yet label Jan 23, 2026
@lemeurherve lemeurherve marked this pull request as draft January 28, 2026 22:23
@lemeurherve lemeurherve force-pushed the use-a-switch-in-agentselector branch 2 times, most recently from d13adbc to 91dede7 Compare January 28, 2026 23:15
@lemeurherve lemeurherve force-pushed the use-a-switch-in-agentselector branch from 91dede7 to dd29d08 Compare January 28, 2026 23:22
@lemeurherve lemeurherve marked this pull request as ready for review January 28, 2026 23:24
Copy link
Member

@timja timja left a comment

Choose a reason for hiding this comment

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

I think doing it with the last number is a bit magic and could be clearer with more specific regexes

Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
@lemeurherve lemeurherve merged commit 12e7dcb into jenkinsci:master Jan 29, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants