-
Notifications
You must be signed in to change notification settings - Fork 0
Add logic to generate Renovate postUpgradeTasks
#62
Conversation
This commit adjusts the initial modulesync config generated by the component template to match the changes introduced by projectsyn/modulesync-control#62 which facilitate keeping the Renovate `postUpgradeTasks` updated when new matrix tests are added.
7546223
to
c712142
Compare
This commit adjusts the initial modulesync config generated by the component template to match the changes introduced by projectsyn/modulesync-control#62 which facilitate keeping the Renovate `postUpgradeTasks` updated when new matrix tests are added.
c712142
to
7da8104
Compare
This commit adjusts the initial modulesync config generated by the component template to match the changes introduced by projectsyn/modulesync-control#62 which facilitate keeping the Renovate `postUpgradeTasks` updated when new matrix tests are added.
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.
Maybe we could track the test targets in the Makefile too?
Something like make gen-golden-all
would speed up the workflow considerably for some components. Bonus: Less complicated json rendering for renovate tasks.
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.
LGTM
I actually already implemented this for a component at some point, but forgot about it until you mentioned it. I'll redo the PR to implement the |
Until now, the test matrix has been defined in a local variable for the `.github/workflows/test.yaml` template. In preparation for generating Renovate `postUpgradeTasks` and a list of test instances in a make variable, we need to be able to access the matrix test configuration in other templates. This commit moves the test matrix configuration to global variable `testMatrix`. For now, the GitHub actions template will continue to read the test matrix from the file-level variable `matrix`, but will fall back to the global variable `testMatrix` if the file-level variable is missing. All already onboarded components should migrate their test matrix (if any) to global parameter `testMatrix`.
808fddf
to
77a146b
Compare
This commit adjusts the initial modulesync config generated by the component template to match the changes introduced by projectsyn/modulesync-control#62 which facilitate keeping the Renovate `postUpgradeTasks` updated when new matrix tests are added.
These targets use a static list of test instances in make variable `test_instances`. The contents of this variable are generated from the modulesync parameter `testMatrix.entries`. We use a generic recursive make target based on the `test_instances` make variable to implement the new targets. This allows us to reuse the existing `golden-diff` and `gen-golden` targets. The new targets are only added for components which have golden and matrix tests configured and which have migrated their matrix test configuration to modulesync parameter `testMatrix`.
We generate section `postUpgradeTasks` in `renovate.json` for components which have golden tests enabled. To determine the command to execute, we check if the component has matrix tests configured (based on parameter `testMatrix`). We use the `make gen-golden-all` as the command for components with matrix tests and `make gen-golden` for other components.
77a146b
to
40f563c
Compare
Until now, the test matrix has been defined in a local variable for the
.github/workflows/test.yaml
template. To allow us to generate RenovatepostUpgradeTasks
and a list of test instances in a make variable, we need to be able to access the matrix test configuration in other templates.This PR moves the test matrix configuration to global variable
testMatrix
. For now, the GitHub actions template will continue to read the test matrix from the file-level variablematrix
, but will fall back to the global variabletestMatrix
if the file-level variable is missing.Additionally, the PR adds new make targets
golden-diff-all
andgen-golden-all
. These targets use a static list of test instances in make variabletest_instances
. The contents of this variable are generated from the modulesync parametertestMatrix.entries
.We use a generic recursive make target based on the
test_instances
make variable to implement the new targets. This allows us to reuse the existinggolden-diff
andgen-golden
targets.The new targets are only added for components which have matrix tests configured and which have migrated their matrix test configuration to modulesync parameter
testMatrix
.Finally, this PR adds logic to generate section
postUpgradeTasks
inrenovate.json
for componentswhich have golden tests enabled. To determine the command to execute, we check if the component has matrix tests configured (based on parameter
testMatrix
). We use themake gen-golden-all
as the command for components with matrix tests andmake gen-golden
for other components.Commodore component-template PR: projectsyn/commodore#424
Checklist
bug
,enhancement
,documentation
,change
,breaking
,dependency
as they show up in the changelog