Closed lemeurherve closed 1 week ago
this works with an include and an exclude?
Yes:
The helmfile diff looks good to me (the JobDSL change is the one expected by this PR change). So I'm approving.
- However it looks like this change will make the Multibranch job to stop watching the builds for the branch
main
but also the builds of PR targeted to themain
branch as per the UI name of the Branch Source Trait" changed: "Filter by name including PRs destined for this branch (with wildcards)"=> you may try merging this PR but I believe we'll have to add a new feature on the
jenkins-jobs
helm chart to allow customization of the other "Branch Source" traits such as allowing to disable "Discover branches" trait and/or the "Discover pull requests from origin" trait and/or "Discover pull requests from forks"
A few pointers to help:
Closing in favor of @dduportal recommendations.
The helmfile diff looks good to me (the JobDSL change is the one expected by this PR change). So I'm approving.
- However it looks like this change will make the Multibranch job to stop watching the builds for the branch
main
but also the builds of PR targeted to themain
branch as per the UI name of the Branch Source Trait" changed: "Filter by name including PRs destined for this branch (with wildcards)"=> you may try merging this PR but I believe we'll have to add a new feature on the
jenkins-jobs
helm chart to allow customization of the other "Branch Source" traits such as allowing to disable "Discover branches" trait and/or the "Discover pull requests from origin" trait and/or "Discover pull requests from forks"A few pointers to help:
* Customization of the "branch discovery" trait is there: https://github.com/jenkins-infra/helm-charts/blob/8800432356358003e7327ee6fbd337aad0193801/charts/jenkins-jobs/templates/_helpers.tpl#L152-L154 * Customization of the "discover origin pull requests" is there: https://github.com/jenkins-infra/helm-charts/blob/8800432356358003e7327ee6fbd337aad0193801/charts/jenkins-jobs/templates/_helpers.tpl#L155-L158 * Customization of the "discover PR from forks" (with the trust stuff) is there: https://github.com/jenkins-infra/helm-charts/blob/8800432356358003e7327ee6fbd337aad0193801/charts/jenkins-jobs/templates/_helpers.tpl#L213-L218. * Note: it uses the "tedious XML node" syntax and I'm pretty sure JobDSL now provides a modern syntax like the 2 above (easier to templatize) * Finally: we would have to tune (in the same feature) the build strategies (defined in https://github.com/jenkins-infra/helm-charts/blob/8800432356358003e7327ee6fbd337aad0193801/charts/jenkins-jobs/templates/_helpers.tpl#L175-L194) so not only we scan the PR/branches we want, but we also build them.
Opened issues to implement separately:
This PR excludes build from main for stats.jenkins.io PR previews job.
Testing done:
helmfile diff -f clusters/privatek8s.yaml -l name=jenkins-infra-jobs
Follow-up of:
5345
5349
Ref: