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

chore: build images on PR and conditionally build arm64 image on push #8108

Merged
merged 1 commit into from Jan 7, 2022

Conversation

alexmt
Copy link
Collaborator

@alexmt alexmt commented Jan 6, 2022

Signed-off-by: Alexander Matyushentsev AMatyushentsev@gmail.com

Closes #8110
Closes #4211
Closes #7035

PR introduces building multi-arch image and ARM binaries during release as well as multi-arch image build during PRs.

Why docker buildx?

I've tried to configure self-hosted Github runners on ARM hosts to avoid using docker buildx but it appears extremely difficult to re-create exact same VM setup as cloud runners. I was able to set up a self-hosted runner that can build a docker image but could not run e2e tests. I think it is not worth managing self-hosted runner just to build an image. The docker buildx is slow but we build multi-arch image only during release and after commit is pushed so it won't slowdown PR reviews.

@codecov
Copy link

codecov bot commented Jan 7, 2022

Codecov Report

Merging #8108 (2d38e0f) into master (37851b1) will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8108      +/-   ##
==========================================
- Coverage   41.52%   41.51%   -0.01%     
==========================================
  Files         174      174              
  Lines       22707    22712       +5     
==========================================
  Hits         9430     9430              
- Misses      11936    11941       +5     
  Partials     1341     1341              
Impacted Files Coverage Δ
cmd/argocd/commands/headless/headless.go 3.48% <0.00%> (-0.13%) ⬇️
cmd/argocd/commands/admin/dashboard.go 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 37851b1...2d38e0f. Read the comment docs.

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
@alexmt alexmt marked this pull request as ready for review January 7, 2022 16:52
@alexmt alexmt requested a review from jannfis January 7, 2022 16:59
@alexmt alexmt requested a review from jessesuen January 7, 2022 16:59
@@ -15,16 +15,6 @@ env:
GOLANG_VERSION: '1.16.11'

jobs:
build-docker:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No longer needed sync image workflow will cover both PRs and push to master

pull_request:
branches:
- master
types: [ labeled, unlabeled, opened, synchronize, reopened ]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Adding labeled and unlabeled types to catch adding and removing test-arm-image label.

Copy link
Member

@jannfis jannfis left a comment

Choose a reason for hiding this comment

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

LGTM.

I do not think that this PR closes the mentioned issues tho, unless we also publish release images.

@alexmt
Copy link
Collaborator Author

alexmt commented Jan 7, 2022

Release workflow is updated as well: it builds multi-arch image and uploads ARM binaries as well.

@jannfis
Copy link
Member

jannfis commented Jan 7, 2022

Release workflow is updated as well: it builds multi-arch image and uploads ARM binaries as well.

Oh, you're right, sorry. The concern that I have with integrating buildx into release workflow is, that it takes so long to build and might fail on its way. But OK, we'll see how it goes.

@alexmt alexmt merged commit 5da1522 into argoproj:master Jan 7, 2022
@alexmt alexmt deleted the image-buildx-arm branch January 7, 2022 21:22
@alexmt
Copy link
Collaborator Author

alexmt commented Jan 7, 2022

Ops, push failed :( Working on the fix

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

Successfully merging this pull request may close these issues.

arm64 Docker build Release Linux/ARM64 Argo-CD binary to the GitHub Releases Cross Build Images for ARM
2 participants