Skip to content

chore(pipeline): cleanup before splits introduction - #7085

Merged
lemeurherve merged 2 commits into
jenkinsci:masterfrom
lemeurherve:7037-03-pipeline-cleanup
Jul 17, 2026
Merged

chore(pipeline): cleanup before splits introduction#7085
lemeurherve merged 2 commits into
jenkinsci:masterfrom
lemeurherve:7037-03-pipeline-cleanup

Conversation

@lemeurherve

@lemeurherve lemeurherve commented Jul 16, 2026

Copy link
Copy Markdown
Member

This change is a cleanup of the pipeline after #7033, #7077, #7078 & #7079 to get a clean state before introducing #7086.

All variables (except junitResults) are now typed.
Labels and markers are regrouped in a flags map instead of having each of them a boolean.
Checkout, initialisation and infra.maybePublishIncrementals() have now their own stages for easier duration retrieval.

Extracted from:

Refs:

Testing done

CI

Stage init and publish incrementals:

Details
image
image

Skipped (shown as "..." / gray in the graph):

image

Initial build, with weekly-test and limited-plugin-set labels: https://ci.jenkins.io/job/Tools/job/bom/job/PR-7085/3

Details
image

Subsequent build triggered with "Build now" via Jenkins UI, with full-test and limited-plugin-set labels: https://ci.jenkins.io/job/Tools/job/bom/job/PR-7085/12

Details
image

Next build triggered via a rerun, with weekly-test and limited-plugin-set labels: https://ci.jenkins.io/job/Tools/job/bom/job/PR-7085/13

Details
image

Final build, no labels: https://ci.jenkins.io/job/Tools/job/bom/job/PR-7085/18

Details
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 Reduces future maintenance internal weekly-test Test only the Weekly line in this PR limited-plugin-set Run on (hardcoded) limited set of plugins, for debugging purposes labels Jul 16, 2026
@lemeurherve lemeurherve mentioned this pull request Jul 16, 2026
11 tasks
@lemeurherve
lemeurherve force-pushed the 7037-03-pipeline-cleanup branch from 5e5d4ea to ab15f92 Compare July 16, 2026 21:21
Comment thread Jenkinsfile
if (BRANCH_NAME == 'master' || fullTestMarkerFile || weeklyTestMarkerFile || env.CHANGE_ID && (fullTestLabel || weeklyTestLabel)) {
def branches = [failFast: false]
lines.each {line ->
if (line != 'weekly' && (weeklyTestMarkerFile || env.CHANGE_ID && weeklyTestLabel)) {

@lemeurherve lemeurherve Jul 16, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Other lines than weekly are already filtered out in 'parse prep' stage if there is a weekly-test label or marker.

Comment thread Jenkinsfile
def branchName = "${repository}:${line}"
final String branchName = "${repository}:${line}"
branches[branchName] = {
def jdk = line == 'weekly' || line == '2.555.x' ? 21 : 17

@lemeurherve lemeurherve Jul 16, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

As we're keeping only the newest and oldest lines, this case never happened.

Comment thread Jenkinsfile
// Mark build as failed on any marker file
def markerErrors = flags.findAll { flag, sources -> 'marker' in sources }.keySet()
if (!markerErrors.isEmpty()) {
error "Remember to `git rm ${markerErrors.join(' ')}` before taking out of draft"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Making all remaining markers triggering an error, not only full-test marker.

(follow-up of #2166)

Comment thread Jenkinsfile
def foundInBuildNumber = 0
def archiveExists = false
def buildNumber = env.BUILD_NUMBER.toInteger()
int retrieveArtifactsFromPreviousBuilds(String archiveName, String jobName) {

@lemeurherve lemeurherve Jul 16, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Note for later: integrate this function in the pipeline library at the end.

@lemeurherve lemeurherve added full-test Test all LTS lines in this PR and do not halt upon first error. and removed weekly-test Test only the Weekly line in this PR labels Jul 16, 2026
@lemeurherve lemeurherve added weekly-test Test only the Weekly line in this PR and removed full-test Test all LTS lines in this PR and do not halt upon first error. labels Jul 17, 2026
@lemeurherve
lemeurherve marked this pull request as ready for review July 17, 2026 00:14
@lemeurherve
lemeurherve requested a review from a team as a code owner July 17, 2026 00:14
@lemeurherve lemeurherve removed weekly-test Test only the Weekly line in this PR limited-plugin-set Run on (hardcoded) limited set of plugins, for debugging purposes labels Jul 17, 2026
@lemeurherve
lemeurherve force-pushed the 7037-03-pipeline-cleanup branch from 8f84fd0 to a82b5b5 Compare July 17, 2026 00:30
@lemeurherve
lemeurherve force-pushed the 7037-03-pipeline-cleanup branch from a82b5b5 to 195b9fc Compare July 17, 2026 00:31
@lemeurherve lemeurherve mentioned this pull request Jul 17, 2026
12 tasks
@lemeurherve

Copy link
Copy Markdown
Member Author

Tested in various pipelines, merging to continue on #7037 extraction and jenkins-infra/helpdesk#5208

Valuable ones incoming:

I'll address any post-merge suggestion in follow-up PRs if needed.

@lemeurherve
lemeurherve merged commit 771a33d into jenkinsci:master Jul 17, 2026
2 checks passed
@lemeurherve
lemeurherve deleted the 7037-03-pipeline-cleanup branch July 17, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Reduces future maintenance internal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant