-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
🌱 hack: implement generator for prowjobs #9937
🌱 hack: implement generator for prowjobs #9937
Conversation
1f2a8e6
to
379564c
Compare
33d8ee5
to
2401856
Compare
/retest |
/retest |
/retitle 🌱 [wip] hack: implement generator for prowjobs |
cb7b7d7
to
8e7d2e5
Compare
Any concerns that we're bringing in a library that hasn't been updated since November of 2022? (github.com/Masterminds/sprig) |
Great point, I did not think about that. We already use sprig in clusterclass / in our core go.mod file which is why I think this could be considered okay. |
If the group already agrees it's ok, then I guess that's cool. Was just a bit concerned given their go.mod is based on 1.13 and they're bringing in old versions of semver. |
To add: happy to adjust / remove it if we consider it for it should not being used, definetly not a must. Some of the sprig functions may just make it more easy to write the templates. |
819c031
to
f1037ac
Compare
Note: I removed sprig and replaced it by standard library functions. One exception: I added a Also removed the other custom implemented functions. |
prowjob-generator allows to generate the periodic and presubmit configuration files in test-infra from a configuration file which simplifies and automates introducing and chaning tests for branches.
a313570
to
02697de
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First round of review. Will continue later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall lgtm, great to see this making progress!
@sbueringer PTAL pending squash |
Thx! Really nice /lgtm /assign @fabriziopandini |
LGTM label has been added. Git tree hash: 7add3fe4b7957b2e14925067896068fcde5d40ed
|
Thx! /lgtm /hold cancel |
/hold |
Sorry wrong tab wanted to approve the test-infra PR :D /approve cancel |
/hold cancel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job!
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabriziopandini The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
Implements
prowjob-gen
a lightweight tool based on go-templates and a configuration file to template prowjob configuration across multiple branches.Example usage (
./../k8s.io/test-infra
is the relativ path for me locally to the root of the test-infra directory):Example output: kubernetes/test-infra#31581
One change to our configuration would be currently:
Our jobs upgrading to
latest
kubernetes (currently v1.30) hadlatest
in their job names. With the current implementation those will use1-30
instead.Example:
periodic-cluster-api-e2e-workload-upgrade-1-29-latest-main
periodic-cluster-api-e2e-workload-upgrade-1-29-1-30-main
Requires to merge the following to make mdlint happy:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #9257
/area ci