Skip to content
Open
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
14 changes: 13 additions & 1 deletion Dockerfile-controllers.test
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@
FROM registry.access.redhat.com/ubi9/python-312:1-1778473732 AS builder
USER root
RUN if [[ "$(uname -m)" != "x86"* ]]; then yum install -y rust-toolset; fi

USER default
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
RUN if [[ "$(uname -m)" == "s390x" ]]; then \
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python; \
fi
WORKDIR /tmp
COPY controllers/servers/csi/requirements.txt ./csi_requirements.txt
COPY controllers/servers/csi/requirements_pyxcli.txt ./csi_requirements_pyxcli.txt
Expand All @@ -42,15 +46,23 @@ RUN pip3 install -r ./requirements-tests.txt

FROM registry.access.redhat.com/ubi9/python-312:1-1778473732

RUN if [[ "$(uname -m)" == "s390x" ]]; then \
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python; \
fi

COPY --from=builder /opt/app-root /opt/app-root
COPY ./common /driver/common
COPY ./controllers/ /driver/controllers/

USER root
RUN groupadd -g 9999 appuser && \
useradd -r -u 9999 -g appuser appuser

RUN chown -R appuser:appuser /driver /opt/app-root

USER appuser
WORKDIR /driver

ENV PYTHONPATH=/driver

ENTRYPOINT ["/driver/controllers/scripts/entrypoint-test.sh"]
ENTRYPOINT ["/driver/controllers/scripts/entrypoint-test.sh"]
3 changes: 3 additions & 0 deletions controllers/scripts/entrypoint-test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash

if [[ "$(uname -m)" == "s390x" ]]; then \
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
fi
./controllers/scripts/pycodestyle.sh
PYCODESTYLE=$?

Expand Down
3 changes: 2 additions & 1 deletion controllers/servers/csi/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ pip==26.1.1
wheel==0.46.2
grpcio==1.74.0
grpcio-tools==1.74.0
protobuf==6.33.5
protobuf==6.33.5; platform_machine == "x86_64"
protobuf==6.31.1; platform_machine != "x86_64"
pyyaml==6.0.2
munch==4.0.0
retry2==0.9.5
Expand Down