fix: Remove hardcoded build_args - #113
Conversation
Signed-off-by: Harpreet Harpreet <HHARPREE@volvocars.com>
|
|
||
| img.build: | ||
| @$(INFO) docker build $(IMAGE) | ||
| @$(MAKE) BUILD_ARGS="--load" img.build.shared |
There was a problem hiding this comment.
I know these args have historically been here for a long time, and they are used in other builds all over the crossplane ecosystem.
How have you gained confidence that removing this won't break the rest of the provider ecosystem?
There was a problem hiding this comment.
I have tested make build on my local by setting BUILD_ARGS as env variable before and after the change.
I've also tested this change with workflow in my provider-snowflake repository.
here are Github action workflow logs for
Before the change
After the change
For now, the only change affecting local development is that users must now set BUILD_ARGS as an environment variable when running the make build command.
I can enhance this by implementing logic to use a default value for the environment variable if it's not explicitly set, otherwise, it will use the provided environment variable.
|
|
Description of your changes
I ran into a problem when trying to streamline my workflow to build and push artifacts in a single step by setting
BUILD_ARGSto--pushin ci workflow. Despite this change, build images weren't being pushed to the registry. I later discovered that theBUILD_ARGSenvironment variable was being overwritten by a hardcoded value within the Makefile during the docker buildx process.Fixes #
I removed the hardcoded
BUILD_ARGSvariableI have:
make reviewable testto ensure this PR is ready for review.