Skip to content

Commit b197ef1

Browse files
author
Arpit Sharma
committed
Updated prow Dockerfile for newer versions and defined new variables
Updated prow Dockerfile for newer versions and defined new variables Updated prow Dockerfile for newer versions and defined new variables
1 parent 5765516 commit b197ef1

File tree

2 files changed

+24
-16
lines changed

2 files changed

+24
-16
lines changed

Dockerfile

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ RUN dnf group install -y "Development Tools" \
88
&& dnf install -y podman jq
99

1010
# Prerequisite for Python installation
11-
ARG python_full_version=3.14.0
11+
ARG python_version=3.14
12+
ARG python_full_version=${python_version}.0
13+
ENV PYTHON_VERSION=${python_version}
1214
RUN dnf install -y openssl-devel bzip2-devel wget libffi-devel
1315

1416
# Install Python
@@ -17,11 +19,12 @@ RUN wget https://www.python.org/ftp/python/${python_full_version}/Python-${pytho
1719
&& cd Python-${python_full_version} \
1820
&& ./configure --enable-optimizations \
1921
&& make altinstall \
20-
&& echo alias python=python3.14 >> ~/.bashrc \
21-
&& rm -rf Python-${python_full_version}.tgz
22+
&& echo alias python=python${python_version} >> ~/.bashrc \
23+
&& cd .. \
24+
&& rm -rf Python-${python_full_version} Python-${python_full_version}.tgz
2225

2326
# install & run benchmark-runner (--no-cache-dir for take always the latest)
24-
RUN python3.14 -m pip install --upgrade pip && python3.14 -m pip install --upgrade benchmark-runner
27+
RUN python${python_version} -m pip install --upgrade pip && python${python_version} -m pip install --upgrade benchmark-runner
2528

2629
# Passed dynamically
2730
ARG OCP_CLIENT_VERSION
@@ -43,10 +46,12 @@ RUN source ~/.bashrc
4346
RUN mkdir -p ~/.kube ~/.ssh /tmp/run_artifacts
4447

4548
# download benchmark-operator to /tmp default path
46-
RUN git clone -b v1.0.4 https://github.com/cloud-bulldozer/benchmark-operator /tmp/benchmark-operator
49+
ARG BENCHMARK_OPERATOR_VERSION=v1.0.4
50+
RUN git clone -b ${BENCHMARK_OPERATOR_VERSION} https://github.com/cloud-bulldozer/benchmark-operator /tmp/benchmark-operator
4751

4852
# download clusterbuster to /tmp default path && install cluster-buster dependency
49-
RUN git clone -b v1.2.2-kata-ci https://github.com/RobertKrawitz/OpenShift4-tools /tmp/OpenShift4-tools \
53+
ARG OPENSHIFT4_TOOLS_VERSION=v1.2.2-kata-ci
54+
RUN git clone -b ${OPENSHIFT4_TOOLS_VERSION} https://github.com/RobertKrawitz/OpenShift4-tools /tmp/OpenShift4-tools \
5055
&& dnf install -y hostname bc procps-ng
5156

5257
# Cleanup to reduce image size
@@ -55,8 +60,8 @@ RUN dnf clean all && rm -rf /var/cache/dnf
5560
# Add main
5661
COPY benchmark_runner/main/main.py /benchmark_runner/main/main.py
5762

58-
CMD [ "python3.14", "/benchmark_runner/main/main.py"]
63+
CMD python${PYTHON_VERSION} /benchmark_runner/main/main.py
5964

6065
# How to build the Dockerfile ?
61-
# sudo podman build --build-arg OCP_CLIENT_VERSION=$OCP_CLIENT_VERSION--build-arg VIRTCTL_VERSION=$VIRTCTL_VERSION -t quay.io/benchmark-runner/benchmark-runner:latest . --no-cache
66+
# sudo podman build --build-arg OCP_CLIENT_VERSION=$OCP_CLIENT_VERSION --build-arg VIRTCTL_VERSION=$VIRTCTL_VERSION --build-arg BENCHMARK_OPERATOR_VERSION=$BENCHMARK_OPERATOR_VERSION --build-arg OPENSHIFT4_TOOLS_VERSION=$OPENSHIFT4_TOOLS_VERSION -t quay.io/benchmark-runner/benchmark-runner:latest . --no-cache
6267
# sudo podman run --rm -it -v /root/.kube/:/root/.kube/ -v /etc/hosts:/etc/hosts --privileged quay.io/benchmark-runner/benchmark-runner:latest /bin/bash

prow/Dockerfile

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
FROM quay.io/centos/centos:stream9
22

3-
ARG python_full_version=3.14.0
4-
ARG OCP_CLIENT_VERSION=4.19.1
5-
ARG VIRTCTL_VERSION=1.5.0
3+
ARG python_version=3.14
4+
ARG python_full_version=${python_version}.0
5+
ARG OCP_CLIENT_VERSION=4.21.2
6+
ARG VIRTCTL_VERSION=1.7.0
7+
ARG BENCHMARK_OPERATOR_VERSION=v1.0.4
8+
ARG OPENSHIFT4_TOOLS_VERSION=v1.2.2-kata-ci
69

710
RUN dnf update -y --nobest \
811
&& dnf group install -y "Development Tools" \
@@ -12,11 +15,11 @@ RUN dnf update -y --nobest \
1215
&& cd Python-${python_full_version} \
1316
&& ./configure --enable-optimizations \
1417
&& make altinstall \
15-
&& echo alias python=python3.14 >> ~/.bashrc \
18+
&& echo alias python=python${python_version} >> ~/.bashrc \
1619
&& cd .. \
1720
&& rm -rf Python-${python_full_version} Python-${python_full_version}.tgz \
18-
&& python3.14 -m pip install --upgrade pip \
19-
&& python3.14 -m pip install --upgrade benchmark-runner \
21+
&& python${python_version} -m pip install --upgrade pip \
22+
&& python${python_version} -m pip install --upgrade benchmark-runner \
2023
&& curl -L "https://mirror.openshift.com/pub/openshift-v4/clients/ocp/${OCP_CLIENT_VERSION}/openshift-client-linux-${OCP_CLIENT_VERSION}.tar.gz" -o "/tmp/openshift-client-linux-${OCP_CLIENT_VERSION}.tar.gz" \
2124
&& tar -xzvf /tmp/openshift-client-linux-${OCP_CLIENT_VERSION}.tar.gz -C /tmp/ \
2225
&& mv /tmp/kubectl /usr/local/bin/kubectl \
@@ -25,8 +28,8 @@ RUN dnf update -y --nobest \
2528
&& curl -L "https://github.com/kubevirt/kubevirt/releases/download/v${VIRTCTL_VERSION}/virtctl-v${VIRTCTL_VERSION}-linux-amd64" -o /usr/local/bin/virtctl \
2629
&& chmod +x /usr/local/bin/virtctl \
2730
&& mkdir -p ~/.kube ~/.ssh /tmp/run_artifacts \
28-
&& git clone -b v1.0.4 https://github.com/cloud-bulldozer/benchmark-operator /tmp/benchmark-operator \
29-
&& git clone -b v1.2.2-kata-ci https://github.com/RobertKrawitz/OpenShift4-tools /tmp/OpenShift4-tools \
31+
&& git clone -b ${BENCHMARK_OPERATOR_VERSION} https://github.com/cloud-bulldozer/benchmark-operator /tmp/benchmark-operator \
32+
&& git clone -b ${OPENSHIFT4_TOOLS_VERSION} https://github.com/RobertKrawitz/OpenShift4-tools /tmp/OpenShift4-tools \
3033
&& dnf clean all \
3134
&& rm -rf /var/cache/dnf
3235

0 commit comments

Comments
 (0)