Allow make
target customization
#1131
Labels
kind/engineering
Work that is not visible to an external user
make
target customization
#1131
Currently, we either ship a fully generated
Makefile
to providers (bridged) or we leave it entirely up to the provider to implement their ownMakefile
(native).There are a number of problems with this:
Makefiles
can break or become stale as the underlying workflows change or evolve. For example as we look to roll out more generalized test sharding (Invert build tags to improve DX #676) we would need to update all nativeMakefiles
to take advantage.Makefiles
don't expose any entry points for customization. As a result, we've baked a number options intoci-mgmt.yml
which in many cases only apply to one or two providers. This isn't scalable -- it's difficult to maintain and it creates a tight coupling between providers and ci-mgmt.Instead, ci-mgmt should make some default
make
targets available to each provider while also giving providers the ability to override those targets should they need to. For example,pulumi-eks
should be able to use standardbuild_go
,build_python
,build_dotnet
targets but also be able to define its ownbuild_nodejs
since it's a component provider with unique node requirements.I've prototyped one approach which seems viable:
ci-mgmt
manages a.mk
directory for the provider. This directory includesdefaults.mk
for default targets, andvars.mk
for default variable likePACK=eks
.default.build_nodejs:
. Thedefaults.mk
file includes a catch-all rule like so:Makefile
can then contain only the following to automatically pick up any default variables and targets. This should be completely sufficient for the boilerplate to participate in CI workflows:include .mk/defaults.mk
The text was updated successfully, but these errors were encountered: