Skip to content

Commit

Permalink
Adding support for linux/ppc64le in CI for centraldashboard multi-arc… (
Browse files Browse the repository at this point in the history
  • Loading branch information
amitmukati-2604 authored Feb 6, 2023
1 parent 7db9c95 commit 65e41bf
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/centraldb_docker_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
env:
DOCKER_USER: kubeflownotebookswg
IMG: kubeflownotebookswg/centraldashboard
ARCH: linux/ppc64le,linux/amd64

jobs:
push_to_registry:
Expand All @@ -32,23 +33,29 @@ jobs:
with:
username: ${{ env.DOCKER_USER }}
password: ${{ secrets.KUBEFLOWNOTEBOOKSWG_DOCKER_TOKEN }}

- name: Setup QEMU
uses: docker/setup-qemu-action@v2

- name: Run CentralDashboard build/push
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build and push multi-arch docker image
run: |
cd components/centraldashboard
make docker-build docker-push
make docker-build-push-multi-arch
- name: Run CentralDashboard build/push latest
- name: Build and push latest multi-arch docker image
if: github.ref == 'refs/heads/master'
run: |
export TAG=latest
cd components/centraldashboard
make docker-build docker-push
make docker-build-push-multi-arch
- name: Run CentralDashboard build/push on Version change
- name: Build and push multi-arch docker image on Version change
id: version
if: steps.filter.outputs.version == 'true'
run: |
export TAG=$(cat releasing/version/VERSION)
cd components/centraldashboard
make docker-build docker-push
make docker-build-push-multi-arch
11 changes: 11 additions & 0 deletions components/centraldashboard/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
IMG ?= centraldashboard
TAG ?= $(shell git describe --tags --always --dirty)
COMMIT = $(shell git rev-parse HEAD)
DOCKERFILE ?= centraldashboard/Dockerfile
ARCH ?= linux/amd64


all: build
Expand Down Expand Up @@ -28,6 +30,15 @@ docker-build:
docker-push:
docker push $(IMG):$(TAG)

.PHONY: docker-build-multi-arch
docker-build-multi-arch: ## Build multi-arch docker images with docker buildx
cd ../ && docker buildx build --platform ${ARCH} --tag ${IMG}:${TAG} -f ${DOCKERFILE} .


.PHONY: docker-build-push-multi-arch
docker-build-push-multi-arch: ## Build multi-arch docker images with docker buildx and push to docker registry
cd ../ && docker buildx build --platform ${ARCH} --tag ${IMG}:${TAG} --push -f ${DOCKERFILE} .

# Build but don't attach the latest tag. This allows manual testing/inspection of the image
# first.
push: build
Expand Down

0 comments on commit 65e41bf

Please sign in to comment.