diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3014a9347..7e12c9736 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -39,6 +39,6 @@ jobs: timeout_minutes: 20 max_attempts: 5 retry_wait_seconds: 60 - command: docker buildx build --platform linux/amd64 --cache-from="type=registry,ref=${CACHE_IMAGE_FULL}" --cache-to="type=registry,ref=${CACHE_IMAGE_FULL},mode=max" -t ${IMAGE_FULL} -f apache.Dockerfile --push . + command: docker buildx build --platform linux/amd64,linux/s390x --cache-from="type=registry,ref=${CACHE_IMAGE_FULL}" --cache-to="type=registry,ref=${CACHE_IMAGE_FULL},mode=max" -t ${IMAGE_FULL} -f apache.Dockerfile --push . - name: "Docker Logout" run: docker logout diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 23c372c82..d7d5df30a 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -34,4 +34,4 @@ jobs: timeout_minutes: 100 max_attempts: 5 retry_wait_seconds: 60 - command: docker buildx build --platform linux/amd64 --cache-from="type=registry,ref=${CACHE_IMAGE_FULL}" -t ${IMAGE_FULL} -f apache.Dockerfile . + command: docker buildx build --platform linux/amd64,linux/s390x --cache-from="type=registry,ref=${CACHE_IMAGE_FULL}" -t ${IMAGE_FULL} -f apache.Dockerfile . diff --git a/Dockerfile b/Dockerfile index c6ce044a1..783032a29 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,6 +17,7 @@ FROM node:8.16.0 RUN apt-get update \ && apt-get install -y git curl \ + && if [ "$(uname -m)" = "s390x" ]; then apt-get install -y phantomjs; fi \ && apt-get -y clean \ && rm -rf /var/lib/apt/lists/* @@ -30,11 +31,12 @@ RUN if [ "$(uname -m)" = "ppc64le" ]; then \ COPY package.json /dashboard/ COPY yarn.lock /dashboard/ WORKDIR /dashboard -RUN yarn install --ignore-optional +RUN if [ "$(uname -m)" = "s390x" ]; then export QT_QPA_PLATFORM=offscreen; fi \ + && yarn install --ignore-optional COPY . /dashboard/ -RUN if [ "$(uname -m)" = "ppc64le" ]; then yarn build; else \ +RUN if [ "$(uname -m)" = "ppc64le" ] || [ "$(uname -m)" = "s390x" ]; then yarn build; else \ yarn build && yarn test; fi RUN cd /dashboard/target/ && tar zcf /tmp/dashboard.tar.gz dist/ diff --git a/apache.Dockerfile b/apache.Dockerfile index 0457bb03c..72b040d12 100644 --- a/apache.Dockerfile +++ b/apache.Dockerfile @@ -13,6 +13,7 @@ FROM docker.io/node:8.16.2 as builder RUN apt-get update \ && apt-get install -y git curl \ + && if [ "$(uname -m)" = "s390x" ]; then apt-get install -y phantomjs; fi \ && apt-get -y clean \ && rm -rf /var/lib/apt/lists/* @@ -27,10 +28,11 @@ COPY package.json /dashboard/ COPY yarn.lock /dashboard/ WORKDIR /dashboard -RUN yarn install --ignore-optional +RUN if [ "$(uname -m)" = "s390x" ]; then export QT_QPA_PLATFORM=offscreen; fi \ + && yarn install --ignore-optional COPY . /dashboard/ -RUN if [ "$(uname -m)" = "ppc64le" ]; then yarn build; else \ +RUN if [ "$(uname -m)" = "ppc64le" ] || [ "$(uname -m)" = "s390x" ]; then yarn build; else \ yarn build && yarn test; fi FROM docker.io/httpd:2.4.43-alpine