Run build steps for multi-arch sequentially (#7333)

* Run build steps for multi-arch sequentially

We saw that if we try to build using an ENV var containing all the
architectures then docker buildx will run 3 parallel jobs.

This made the GH runners crash in some cases because they were
over-utilizing the resources.

To mitigate this we'll sequentially build each image for each arch.

Signed-off-by: Kimonas Sotirchos <kimwnasptd@gmail.com>

* review: Build first for amd64

Signed-off-by: Kimonas Sotirchos <kimwnasptd@gmail.com>

---------

Signed-off-by: Kimonas Sotirchos <kimwnasptd@gmail.com>
This commit is contained in:
Kimonas Sotirchos 2023-10-13 10:59:52 +03:00 коммит произвёл GitHub
Родитель 51becc735f
Коммит 0a69444865
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
20 изменённых файлов: 40 добавлений и 30 удалений

Просмотреть файл

@ -11,7 +11,6 @@ on:
env:
DOCKER_USER: kubeflownotebookswg
IMG: kubeflownotebookswg/centraldashboard
ARCH: linux/ppc64le,linux/amd64,linux/arm64/v8
jobs:
push_to_registry:
@ -43,7 +42,9 @@ jobs:
- name: Build and push multi-arch docker image
run: |
cd components/centraldashboard
make docker-build-push-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch
- name: Build and push latest multi-arch docker image
if: github.ref == 'refs/heads/master'

Просмотреть файл

@ -30,6 +30,6 @@ jobs:
- name: Build multi-arch Image
run: |
cd components/centraldashboard
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch

5
.github/workflows/jwa_docker_publish.yaml поставляемый
Просмотреть файл

@ -12,7 +12,6 @@ on:
env:
DOCKER_USER: kubeflownotebookswg
IMG: kubeflownotebookswg/jupyter-web-app
ARCH: linux/amd64,linux/ppc64le,linux/arm64/v8
jobs:
push_to_registry:
@ -44,7 +43,9 @@ jobs:
- name: Build and push multi-arch docker image
run: |
cd components/crud-web-apps/jupyter
make docker-build-push-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch
- name: Build and push latest multi-arch docker image
if: github.ref == 'refs/heads/master'

2
.github/workflows/jwa_multi_arch_test.yaml поставляемый
Просмотреть файл

@ -31,6 +31,6 @@ jobs:
- name: Build multi-arch Image
run: |
cd components/crud-web-apps/jupyter
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch

5
.github/workflows/kfam_docker_publish.yaml поставляемый
Просмотреть файл

@ -11,7 +11,6 @@ on:
env:
DOCKER_USER: kubeflownotebookswg
IMG: kubeflownotebookswg/kfam
ARCH: linux/amd64,linux/ppc64le,linux/arm64/v8
jobs:
push_to_registry:
@ -43,7 +42,9 @@ jobs:
- name: Build and push multi-arch docker image
run: |
cd components/access-management
make docker-build-push-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch
- name: Build and push latest multi-arch docker image
if: github.ref == 'refs/heads/master'

2
.github/workflows/kfam_multi_arch_test.yaml поставляемый
Просмотреть файл

@ -30,6 +30,6 @@ jobs:
- name: Build multi-arch Image
run: |
cd components/access-management
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch

Просмотреть файл

@ -12,7 +12,6 @@ on:
env:
DOCKER_USER: kubeflownotebookswg
IMG: kubeflownotebookswg/notebook-controller
ARCH: linux/amd64,linux/ppc64le,linux/arm64/v8
jobs:
push_to_registry:
@ -44,7 +43,9 @@ jobs:
- name: Build and push multi-arch docker image
run: |
cd components/notebook-controller
make docker-build-push-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch
- name: Build and push latest multi-arch docker image
if: github.ref == 'refs/heads/master'

Просмотреть файл

@ -30,6 +30,6 @@ jobs:
- name: Build multi-arch Image
run: |
cd components/notebook-controller
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch

Просмотреть файл

@ -11,7 +11,6 @@ on:
env:
DOCKER_USER: kubeflownotebookswg
IMG: kubeflownotebookswg/poddefaults-webhook
ARCH: linux/amd64,linux/ppc64le,linux/arm64/v8
jobs:
push_to_registry:
@ -43,7 +42,9 @@ jobs:
- name: Build and push multi-arch docker image
run: |
cd components/admission-webhook
make docker-build-push-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch
- name: Build and push latest multi-arch docker image
if: github.ref == 'refs/heads/master'

Просмотреть файл

@ -30,6 +30,6 @@ jobs:
- name: Build multi-arch Image
run: |
cd components/admission-webhook
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch

Просмотреть файл

@ -11,7 +11,6 @@ on:
env:
DOCKER_USER: kubeflownotebookswg
IMG: kubeflownotebookswg/profile-controller
ARCH: linux/amd64,linux/ppc64le,linux/arm64/v8
jobs:
push_to_registry:
@ -43,7 +42,9 @@ jobs:
- name: Build and push multi-arch docker image
run: |
cd components/profile-controller
make docker-build-push-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch
- name: Build and push latest multi-arch docker image
if: github.ref == 'refs/heads/master'

Просмотреть файл

@ -30,6 +30,6 @@ jobs:
- name: Build multi-arch Image
run: |
cd components/profile-controller
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch

Просмотреть файл

@ -12,7 +12,6 @@ on:
env:
DOCKER_USER: kubeflownotebookswg
IMG: kubeflownotebookswg/pvcviewer-controller
ARCH: linux/amd64,linux/ppc64le,linux/arm64/v8
jobs:
push_to_registry:
@ -41,7 +40,9 @@ jobs:
- name: Build and push multi-arch docker image
run: |
cd components/pvcviewer-controller
make docker-build-push-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch
- name: Build and push latest multi-arch docker image
if: github.ref == 'refs/heads/master'

Просмотреть файл

@ -30,6 +30,6 @@ jobs:
- name: Build multi-arch Image
run: |
cd components/pvcviewer-controller
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch

Просмотреть файл

@ -11,7 +11,6 @@ on:
env:
DOCKER_USER: kubeflownotebookswg
IMG: kubeflownotebookswg/tensorboard-controller
ARCH: linux/amd64,linux/ppc64le,linux/arm64/v8
jobs:
push_to_registry:
@ -43,7 +42,9 @@ jobs:
- name: Build and push multi-arch docker image
run: |
cd components/tensorboard-controller
make docker-build-push-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch
- name: Build and push latest multi-arch docker image
if: github.ref == 'refs/heads/master'

Просмотреть файл

@ -30,6 +30,6 @@ jobs:
- name: Build multi-arch Image
run: |
cd components/tensorboard-controller
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch

5
.github/workflows/twa_docker_publish.yaml поставляемый
Просмотреть файл

@ -12,7 +12,6 @@ on:
env:
DOCKER_USER: kubeflownotebookswg
IMG: kubeflownotebookswg/tensorboards-web-app
ARCH: linux/amd64,linux/ppc64le,linux/arm64/v8
jobs:
push_to_registry:
@ -44,7 +43,9 @@ jobs:
- name: Build and push multi-arch docker image
run: |
cd components/crud-web-apps/tensorboards
make docker-build-push-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch
- name: Build and push latest multi-arch docker image
if: github.ref == 'refs/heads/master'

2
.github/workflows/twa_multi_arch_test.yaml поставляемый
Просмотреть файл

@ -31,6 +31,6 @@ jobs:
- name: Build multi-arch Image
run: |
cd components/crud-web-apps/tensorboards
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch

5
.github/workflows/vwa_docker_publish.yaml поставляемый
Просмотреть файл

@ -12,7 +12,6 @@ on:
env:
DOCKER_USER: kubeflownotebookswg
IMG: kubeflownotebookswg/volumes-web-app
ARCH: linux/amd64,linux/ppc64le,linux/arm64/v8
jobs:
push_to_registry:
@ -44,7 +43,9 @@ jobs:
- name: Build and push multi-arch docker image
run: |
cd components/crud-web-apps/volumes
make docker-build-push-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch
- name: Build and push latest multi-arch docker image
if: github.ref == 'refs/heads/master'

2
.github/workflows/vwa_multi_arch_test.yaml поставляемый
Просмотреть файл

@ -31,6 +31,6 @@ jobs:
- name: Build multi-arch Image
run: |
cd components/crud-web-apps/volumes
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/amd64 make docker-build-multi-arch
ARCH=linux/ppc64le make docker-build-multi-arch
ARCH=linux/arm64/v8 make docker-build-multi-arch