-
Notifications
You must be signed in to change notification settings - Fork 29
MULTIARCH-5587: Enabling power arch image builds for v2 #23
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| name: Build and Push Multi-Arch Image | ||
| on: [push] | ||
|
|
||
| jobs: | ||
| build-and-push: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check out code | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Set up QEMU | ||
| uses: docker/setup-qemu-action@v2 | ||
|
|
||
| - name: Set up Buildx | ||
| uses: docker/setup-buildx-action@v2 | ||
|
|
||
| - name: Login to Quay | ||
| run: | | ||
| echo "${{ secrets.QUAY_TOKEN }}" | docker login quay.io -u "${{ secrets.QUAY_USER }}" --password-stdin | ||
| - name: Build and Push Multi-Arch Image | ||
| run: | | ||
| ./plano --file backend/.plano.py build,push | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| name: Build and Push Multi-Arch Image | ||
| on: [push] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. |
||
|
|
||
| jobs: | ||
| build-and-push: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check out code | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Set up QEMU | ||
| uses: docker/setup-qemu-action@v2 | ||
|
|
||
| - name: Set up Buildx | ||
| uses: docker/setup-buildx-action@v2 | ||
|
|
||
| - name: Login to Quay | ||
| run: | | ||
| echo "${{ secrets.QUAY_TOKEN }}" | docker login quay.io -u "${{ secrets.QUAY_USER }}" --password-stdin | ||
| - name: Build and Push Multi-Arch Image | ||
| run: | | ||
| ./plano --file frontend/.plano.py update-gesso,build,push | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,7 +25,9 @@ | |
| def build(no_cache=False): | ||
| no_cache_arg = "--no-cache" if no_cache else "" | ||
|
|
||
| run(f"podman build {no_cache_arg} --format docker -t {image_tag} .") | ||
| run(f"podman manifest rm {image_tag}", check=False) | ||
| run(f"podman rmi {image_tag}", check=False) | ||
|
Comment on lines
+28
to
+29
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This addition is only needed true outside of a workflow. |
||
| run(f"podman build {no_cache_arg} --format docker --platform linux/amd64,linux/arm64,linux/s390x,linux/ppc64le --file backend/Containerfile --manifest {image_tag} ./backend") | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. makes sense |
||
|
|
||
| @command | ||
| def run_(): | ||
|
|
@@ -38,4 +40,4 @@ def debug(): | |
| @command | ||
| def push(): | ||
| run("podman login quay.io") | ||
| run(f"podman push {image_tag}") | ||
| run(f"podman manifest push {image_tag}") | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,7 +26,7 @@ FROM python:alpine AS run | |
| RUN adduser -S fritz -G root | ||
| USER fritz | ||
|
|
||
| COPY --from=build /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages | ||
| COPY --from=build /usr/local/lib/python3.14/site-packages /usr/local/lib/python3.14/site-packages | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's just add a comment telling why inline. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. as a review comment
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated python version in Containerfiles as tag alpine uses updated python v3.14 |
||
| COPY --chown=fritz:root python /home/fritz/python | ||
|
|
||
| EXPOSE 8080 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,7 +26,9 @@ | |
| def build(no_cache=False): | ||
| no_cache_arg = "--no-cache" if no_cache else "" | ||
|
|
||
| run(f"podman build {no_cache_arg} --format docker -t {image_tag} .") | ||
| run(f"podman manifest rm {image_tag}", check=False) | ||
| run(f"podman rmi {image_tag}", check=False) | ||
|
Comment on lines
+29
to
+30
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment as earlier... This addition is only needed true outside of a workflow. |
||
| run(f"podman build {no_cache_arg} --format docker --platform linux/amd64,linux/arm64,linux/s390x,linux/ppc64le --file frontend/Containerfile --manifest {image_tag} ./frontend") | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. makes sense |
||
|
|
||
| @command | ||
| def run_(): | ||
|
|
@@ -57,7 +59,7 @@ def debug(): | |
| @command | ||
| def push(): | ||
| run("podman login quay.io") | ||
| run(f"podman push {image_tag}") | ||
| run(f"podman manifest push {image_tag}") | ||
|
|
||
| @command | ||
| def update_gesso(): | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this currently runs for all branches. I think we should restrict it to main - especially if we plan to go "tagless" and rely on
latest.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we also filter to only build if backend code changes (rare):
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Support click to run from github ui: