Skip to content

fix: Remove hardcoded build_args - #113

Open
allenkallz wants to merge 1 commit into
crossplane:mainfrom
allenkallz:main
Open

fix: Remove hardcoded build_args#113
allenkallz wants to merge 1 commit into
crossplane:mainfrom
allenkallz:main

Conversation

@allenkallz

Copy link
Copy Markdown

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_ARGS to --push in ci workflow. Despite this change, build images weren't being pushed to the registry. I later discovered that the BUILD_ARGS environment variable was being overwritten by a hardcoded value within the Makefile during the docker buildx process.

Fixes #
I removed the hardcoded BUILD_ARGS variable

I have:

  • Read and followed Crossplane's [contribution process].
  • Run make reviewable test to ensure this PR is ready for review.

Signed-off-by: Harpreet Harpreet <HHARPREE@volvocars.com>

img.build:
@$(INFO) docker build $(IMAGE)
@$(MAKE) BUILD_ARGS="--load" img.build.shared

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@crossplane crossplane deleted a comment from Upbound-CLA Dec 1, 2025
@Upbound-CLA

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants