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

Fix PhantomJS failure for s390x & add support for Github actions. #51

Merged
merged 3 commits into from
Jul 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/*

Expand All @@ -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/

Expand Down
6 changes: 4 additions & 2 deletions apache.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/*

Expand All @@ -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
Expand Down