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

CI: Pin oc version, ubi version #263

Merged
merged 1 commit into from
Jul 29, 2024
Merged
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
27 changes: 4 additions & 23 deletions tests/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
FROM registry.access.redhat.com/ubi8:8.10-901.1716497712
FROM registry.access.redhat.com/ubi8:8.10-1020

ARG ORG=trustyai-explainability
ARG BRANCH=main
ARG ODS_CI_REPO=https://github.com/red-hat-data-services/ods-ci
# This git reference should always reference a stable commit from ods-ci that supports ODH
# This hash corresponds to a March 24th, 2023 commit
ARG ODS_CI_GITREF=867a617bc224726cf98fa3354293f8e50b4f5eb5
ARG OC_CLI_URL=https://mirror.openshift.com/pub/openshift-v4/amd64/clients/ocp/latest/openshift-client-linux.tar.gz
ARG ODS_CI_GITREF=a8cf770b37caa4ef7ce6596acc8bdd6866cc7772
ARG OC_CLI_URL=https://mirror.openshift.com/pub/openshift-v4/amd64/clients/ocp/4.14.33/openshift-client-linux.tar.gz

ENV HOME /root
WORKDIR /root

RUN dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm &&\
dnf install -y jq bc git go-toolset python3.11 python3.11-pip python3.11-devel unzip && \
RUN dnf install -y jq bc git go-toolset python3.11 python3.11-devel python3.11-pip unzip && \
dnf clean all && \
git clone https://github.com/opendatahub-io/peak $HOME/peak && \
cd $HOME/peak && \
Expand All @@ -22,31 +21,13 @@ RUN dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.n
RUN curl -L https://github.com/mikefarah/yq/releases/download/v4.25.1/yq_linux_amd64 -o /usr/bin/yq &&\
chmod +x /usr/bin/yq

RUN mkdir -p $HOME/src && \
cd $HOME/src && \
git clone --depth=1 --branch ${BRANCH} https://github.com/${ORG}/trustyai-explainability && \
# Clone ods-ci repo at specified git ref for the ODH Dashboard webUI tests
git clone --depth=1 ${ODS_CI_REPO} ods-ci && cd ods-ci && \
git fetch origin ${ODS_CI_GITREF} && git checkout FETCH_HEAD && \
chmod -R 777 $HOME/src

# Use a specific destination file name in case the url download name changes
ADD ${OC_CLI_URL} $HOME/peak/oc-cli.tar.gz
RUN tar -C /usr/local/bin -xvf $HOME/peak/oc-cli.tar.gz && \
chmod +x /usr/local/bin/oc

COPY Pipfile Pipfile.lock $HOME/peak/

RUN pip3 install micropipenv &&\
ln -s `which pip3` /usr/bin/pip &&\
cd $HOME/peak &&\
micropipenv install

# Install poetry to support the exeuction of ods-ci test framework
RUN curl -sSL https://install.python-poetry.org | python3 -
ENV PATH="${PATH}:$HOME/.local/bin"
RUN cd $HOME/src/ods-ci && poetry install

## Grab CI scripts from single-source-of-truth
RUN mkdir -p $HOME/peak/operator-tests/trustyai-explainability/ &&\
mkdir $HOME/kfdef/ &&\
Expand Down
Loading