diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 8f4944b5b1..f7e5b52630 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -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 diff --git a/.github/workflows/build-and-publish.yaml b/.github/workflows/build-and-publish.yaml index 3154a9b7e5..5fef976e1d 100644 --- a/.github/workflows/build-and-publish.yaml +++ b/.github/workflows/build-and-publish.yaml @@ -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: @@ -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 }} diff --git a/Dockerfile b/Dockerfile index 2ffdc1ad7c..633b6f8b48 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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\ @@ -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\ diff --git a/requirements.txt b/requirements.txt index a253c31737..0a50d94bb7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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