Skip to content

Commit

Permalink
[redhat-3.8] arch: add ppc64le support to quay (PROJQUAY-4595) (#1558)
Browse files Browse the repository at this point in the history
* add ppc64le support to quay

Co-authored-by: Sneha Kanekar1 <sneha.kanekar1@ibm.com>
  • Loading branch information
openshift-cherrypick-robot and Sneha Kanekar1 committed Oct 12, 2022
1 parent 4dd1e1e commit 2e6f9b1
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/CI.yaml
Expand Up @@ -176,6 +176,11 @@ jobs:
# DOCKER_BUILDKIT: 1
# run: docker build --platform=linux/arm64 .

- name: Docker Build (linux/ppc64le)
env:
DOCKER_BUILDKIT: 1
run: docker build --platform=linux/ppc64le .

mysql:
name: E2E MySQL Test
runs-on: ubuntu-latest
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/build-and-publish.yaml
Expand Up @@ -31,6 +31,12 @@ jobs:
BRANCH_NAME=${GITHUB_REF#refs/heads/}
echo "::set-output name=version::${BRANCH_NAME/${{ env.BRANCH_PREFIX }}/}"
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to Quay.io
uses: docker/login-action@v1
with:
Expand All @@ -44,6 +50,7 @@ jobs:
env:
TAG: ${{ steps.version-from-branch.outputs.version }}${{ env.TAG_SUFFIX }}
with:
platforms: linux/amd64,linux/ppc64le
push: true
tags: ${{ env.REGISTRY }}/${{ env.REPO_NAME }}:${{ github.event.inputs.tag || env.TAG }}

23 changes: 21 additions & 2 deletions Dockerfile
Expand Up @@ -50,13 +50,30 @@ RUN set -ex\
openldap-devel\
python39-devel\
libffi-devel\
openssl-devel \
diffutils \
file \
make \
libjpeg-turbo \
libjpeg-turbo-devel \
wget\
; dnf -y -q clean all
WORKDIR /build
COPY requirements.txt .
# Note that it installs into PYTHONUSERBASE because of the '--user'
# flag.
RUN ARCH=$(uname -m) ; echo $ARCH; \
if [ "$ARCH" == "ppc64le" ] ; then \
GE_LATEST=$(grep "gevent" requirements.txt |cut -d "=" -f 3); \
wget https://github.com/IBM/oss-ecosystem-gevent/releases/download/${GE_LATEST}/manylinux_ppc64le_wheels_${GE_LATEST}.tar.gz; \
tar xvf manylinux_ppc64le_wheels_${GE_LATEST}.tar.gz; \
python3 -m pip install --no-cache-dir --user wheelhouse/gevent-${GE_LATEST}-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl; \
GRPC_LATEST=$(grep "grpcio" requirements.txt |cut -d "=" -f 3); \
wget https://github.com/IBM/oss-ecosystem-grpc/releases/download/${GRPC_LATEST}/grpcio-${GRPC_LATEST}-cp39-cp39-linux_ppc64le.whl; \
python3 -m pip install --no-cache-dir --user grpcio-${GRPC_LATEST}-cp39-cp39-linux_ppc64le.whl; \
fi
RUN set -ex\
; python3 -m pip install --no-cache-dir --progress-bar off --user $(grep -e '^pip=' -e '^wheel=' ./requirements.txt) \
; python3 -m pip install --no-cache-dir --progress-bar off --user $(grep -e '^pip=' -e '^wheel=' -e '^setuptools=' ./requirements.txt) \
; python3 -m pip install --no-cache-dir --progress-bar off --user --requirement requirements.txt \
;
RUN set -ex\
Expand Down Expand Up @@ -94,9 +111,11 @@ RUN chown -R 1001:0 quay-ui/dist

# Pushgateway grabs pushgateway.
FROM registry.access.redhat.com/ubi8/ubi:latest AS pushgateway
ENV OS=linux ARCH=amd64
ENV OS=linux
ARG PUSHGATEWAY_VERSION=1.0.0
RUN set -ex\
; ARCH=$(uname -m) ; echo $ARCH \
; if [ "$ARCH" == "x86_64" ] ; then ARCH="amd64" ; elif [ "$ARCH" == "arm_64" ] ; then ARCH="arm64" ; fi \
; curl -fsSL "https://github.com/prometheus/pushgateway/releases/download/v${PUSHGATEWAY_VERSION}/pushgateway-${PUSHGATEWAY_VERSION}.${OS}-${ARCH}.tar.gz"\
| tar xz "pushgateway-${PUSHGATEWAY_VERSION}.${OS}-${ARCH}/pushgateway"\
; install "pushgateway-${PUSHGATEWAY_VERSION}.${OS}-${ARCH}/pushgateway" /usr/local/bin/pushgateway\
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Expand Up @@ -147,8 +147,8 @@ Cython==3.0.0a9
flit_core==3.7.1
toml==0.10.2
jsonpickle==1.2
pip==21.3
setuptools==50.3.0
pip==22.2.1
setuptools==63.4.0
setuptools-scm[toml]==4.1.2
typing_extensions==4.0.1
wheel==0.35.1

0 comments on commit 2e6f9b1

Please sign in to comment.