Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for apple sillicon build machines #10777

Merged
merged 3 commits into from Oct 4, 2022

Conversation

alexef
Copy link
Member

@alexef alexef commented Oct 3, 2022

When building the docker image on my M1 laptop, I noticed the produced builds are not usable in our Kubernetes cluster (running on x86 nodes).

By passing the DOCKER_PLATFORM build argument to docker build I am able to overcome this and build x86 images locally.

Tested it with:

DOCKER_PLATFORM=--platform=linux/amd64 DEV_IMAGE=true make image

Signed-off-by: Alex Eftimie alex.eftimie@getyourguide.com

Note on DCO:

If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).

When building the docker image on my M1 laptop, I noticed the produced builds are not usable in our Kubernetes cluster (running on x86 nodes).

By passing the DOCKER_PLATFORM build argument to `docker build` I am able to overcome this and build x86 images locally.

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
Makefile Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Oct 3, 2022

Codecov Report

Base: 45.67% // Head: 45.67% // No change to project coverage 👍

Coverage data is based on head (4abe27c) compared to base (76fe1d5).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #10777   +/-   ##
=======================================
  Coverage   45.67%   45.67%           
=======================================
  Files         236      236           
  Lines       28699    28699           
=======================================
  Hits        13108    13108           
  Misses      13799    13799           
  Partials     1792     1792           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
It is only used to produce app/dist, not relevant

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
@alexef alexef requested a review from zachaller October 4, 2022 06:58
@crenshaw-dev crenshaw-dev merged commit f724773 into argoproj:master Oct 4, 2022
@alexef alexef deleted the patch-1 branch October 4, 2022 15:07
@alexef alexef restored the patch-1 branch October 4, 2022 15:07
@alexef alexef deleted the patch-1 branch October 4, 2022 15:09
ashutosh16 pushed a commit to ashutosh16/argo-cd that referenced this pull request Oct 7, 2022
* Add support for apple sillicon build machines

When building the docker image on my M1 laptop, I noticed the produced builds are not usable in our Kubernetes cluster (running on x86 nodes).

By passing the DOCKER_PLATFORM build argument to `docker build` I am able to overcome this and build x86 images locally.

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* Hardcode platform in dev build (same as we hardcode GOOS and GOARCH)

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

* Drop platform from build-ui target

It is only used to produce app/dist, not relevant

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>

Signed-off-by: Alex Eftimie <alex.eftimie@getyourguide.com>
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.

None yet

3 participants