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

feat: select target to build depending on the requirement of the modified files #1471

Merged
merged 1 commit into from
Jan 16, 2024
Merged

feat: select target to build depending on the requirement of the modified files #1471

merged 1 commit into from
Jan 16, 2024

Conversation

lemeurherve
Copy link
Member

@lemeurherve lemeurherve commented Jan 11, 2024

This PR allows to build:

  • Only infra.ci.jenkins.io image variant if only plugins-infra.ci.jenkins.io.txt if modified (with the update-plugins GHA)
  • Only weekly.ci.jenkins.io image variant if only plugins-weekly.ci.jenkins.io.txt if modified (with the update-plugins GHA)
  • Both image variants there is more than one of these files among a list of files requiring a build
  • No image variant build if none of the modified file(s) is requiring a build

Tested with replays in #1470 by alternating the modified files in that PR:

It also allows to create distinct plugins update pull requests depending on which plugins list is updated.

Ref:

@lemeurherve lemeurherve added the enhancement New feature or request label Jan 11, 2024
@lemeurherve lemeurherve requested a review from a team January 11, 2024 20:07
@lemeurherve lemeurherve merged commit 9f5fcf2 into jenkins-infra:main Jan 16, 2024
1 check passed
@lemeurherve lemeurherve deleted the helpdesk3887-build-target-depending-on-modified-files branch January 16, 2024 18:08
@lemeurherve
Copy link
Member Author

The merge of this PR on main has correctly triggered a build of both variants: https://infra.ci.jenkins.io/job/docker-jobs/job/docker-jenkins-weekly/job/main/365/

And the GHA has correctly opened two distinct pull requests:

Finally, these pull requests have themselves correctly triggered a build of only their corresponding variant.

@lemeurherve
Copy link
Member Author

From jenkins-infra/helpdesk#3887 (comment):

Note that running the last-weekly GHA results in a unique pull request containing the Jenkins version update and both plugins lists update, as both should be updated every time the Jenkins version changes:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants