Closed simu closed 2 years ago
Something like make gen-golden-all would speed up the workflow considerably for some components. Bonus: Less complicated json rendering for renovate tasks.
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 gen-golden-all
and golden-diff-all
targets for all components and use gen-golden-all
for the postUpgradeTasks
.
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 components which have golden tests enabled. To determine the command to execute, we check if the component has matrix tests configured (based on parametertestMatrix
). We use themake gen-golden-all
as the command for components with matrix tests andmake gen-golden
for other components.Commodore component-template PR: https://github.com/projectsyn/commodore/pull/424
Checklist
bug
,enhancement
,documentation
,change
,breaking
,dependency
as they show up in the changelog