Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
4710c0d
SRE-2257 ci: Use Artifactory for PyPi
grom72 Jun 27, 2025
bd25cd6
Add build on el 9 test
grom72 Jun 27, 2025
c111390
Add leap 15 build with gcc
grom72 Jun 27, 2025
964cca5
Switch to rockylinux
grom72 Jun 27, 2025
2130fe5
Add Leap 15.6 build
grom72 Jun 27, 2025
56c82ab
Move PyPi to repo-helper
grom72 Jun 27, 2025
67154c3
Fix - use '--proxy=""' to avoid proxy usage
grom72 Jun 27, 2025
ae25855
Test with fake proxy
grom72 Jun 27, 2025
5b109eb
Test with empty proxy
grom72 Jun 27, 2025
8482efa
Too many stages for Jenkinse to process
grom72 Jun 27, 2025
ab401b0
Test without empty proxy for el9
grom72 Jun 27, 2025
2e935eb
Test with fake proxy on el9
grom72 Jun 27, 2025
2afb9b7
Last test with el9
grom72 Jun 27, 2025
6ec3305
Fix no_proxy
grom72 Jun 27, 2025
bba5fe2
Fix for empty no_proxy
grom72 Jun 27, 2025
c32dc06
Yet another fix for el9
grom72 Jun 27, 2025
230b591
Yet another fix for el9 2nd
grom72 Jun 27, 2025
eddc7a5
Finall solution ready for integration
grom72 Jun 27, 2025
289cf31
Finall solution ready for integration (2nd)
grom72 Jun 27, 2025
24db345
el9 does not accept proxy from pip.conf file
grom72 Jun 27, 2025
75312f0
el9 failed build debug
grom72 Jun 27, 2025
91c9b37
Debugging el9 - proxy="" only in pip.conf
grom72 Jun 28, 2025
638b25a
Debugging el9 - proxy="" only in pip.conf in Dockerfile
grom72 Jun 28, 2025
c41395a
Debugging el9 - proxy="" only in pip.conf in Dockerfile - fix
grom72 Jun 28, 2025
007866e
Debugging el9 - proxy= only in pip.conf in repo-helper
grom72 Jun 28, 2025
293b57a
Final solution cleanup 2nd ;)
grom72 Jun 28, 2025
d0414a8
Final solution cleanup 3rd ;)
grom72 Jun 28, 2025
bd6da08
Custom library for test purpose only
grom72 Jun 29, 2025
2e91c7d
sre-2257 - introduce no_proxy support for Dockers
grom72 Jun 28, 2025
1ee3e55
Propagate no proxy to all places
grom72 Jun 28, 2025
b72a94e
remove all export no_proxy
grom72 Jun 28, 2025
a2a885c
DAOS_NO_PROXY instead of NO_PROXY
grom72 Jun 28, 2025
5d9f788
Final tune
grom72 Jun 29, 2025
51800d4
Merge remote-tracking branch 'origin/master' into grom72/sre-2257-no-…
grom72 Jul 3, 2025
f98391b
No proxy is implemented via 'no_proxy' variable'
grom72 Jul 4, 2025
c572687
pipeline-lib changes has landed
grom72 Jul 17, 2025
42f691f
Merge remote-tracking branch 'origin/master' into grom72/sre-2257-no-…
grom72 Sep 17, 2025
7e1051d
Merge remote-tracking branch 'origin/master' into grom72/sre-2257-no-…
grom72 Sep 22, 2025
02e6063
Merge remote-tracking branch 'origin/master' into grom72/sre-2257-no-…
grom72 Nov 19, 2025
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
34 changes: 13 additions & 21 deletions utils/docker/Dockerfile.el.8
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ ARG REPO_FILE_URL
ARG JENKINS_URL
ARG REPOS
ARG DAOS_LAB_CA_FILE_URL

# Accept DAOS_NO_PROXY at build time
ARG DAOS_NO_PROXY
# Propagate into the build environment
ENV no_proxy=${DAOS_NO_PROXY}
ENV NO_PROXY=${DAOS_NO_PROXY}
# Persist into /etc/environment for use by shells and services
RUN echo "no_proxy=${DAOS_NO_PROXY}" >> /etc/environment && \
echo "NO_PROXY=${DAOS_NO_PROXY}" >> /etc/environment

# script to install OS updates basic tools and daos dependencies
COPY ./utils/scripts/install-el8.sh /tmp/install.sh
# script to setup local repo if available
Expand All @@ -37,9 +47,7 @@ FROM basic
# with a local repository, yet needing a proxy to reach outside repositories.
# This needs to be moved to a shell script like above in the future to
# properly only remove the proxy variables only when they need to be removed
RUN if [ -n "$REPO_FILE_URL" ]; then direct="${REPO_FILE_URL##*//}; "\
direct="${direct%%/*}"; export no_proxy="${direct}"; fi; \
dnf upgrade && \
RUN dnf upgrade && \
/tmp/install.sh && \
dnf clean all && \
rm -f /tmp/install.sh
Expand All @@ -59,8 +67,6 @@ RUN mkdir -p /opt/daos /mnt/daos /var/run/daos_server /var/run/daos_agent /home/
chown -R daos_server.daos_server /opt/daos /mnt/daos /var/run/daos_server /home/daos && \
chown daos_agent.daos_agent /var/run/daos_agent

ARG JENKINS_URL

USER daos_server:daos_server

# Setup a python venv so that python packages can be installed locally.
Expand Down Expand Up @@ -96,8 +102,6 @@ ARG DAOS_PACKAGES_BUILD=yes
# ensure that latest dependencies are used.
USER root:root
RUN [ "$DAOS_DEPS_BUILD" != "yes" ] || { \
if [ -n "$REPO_FILE_URL" ]; then direct="${REPO_FILE_URL##*//}; " \
direct="${direct%%/*}"; export no_proxy="${direct}"; fi; \
dnf upgrade --exclude=spdk,spdk-devel,dpdk-devel,dpdk,mercury-devel,mercury && \
dnf clean all; \
}
Expand All @@ -106,8 +110,6 @@ USER daos_server:daos_server
ARG DEPS_JOBS=1

RUN [ "$DAOS_DEPS_BUILD" != "yes" ] || { \
if [ -n "$REPO_FILE_URL" ]; then direct="${REPO_FILE_URL##*//}; "\
direct="${direct%%/*}"; export no_proxy="${direct}"; fi; \
scons --build-deps=only --jobs $DEPS_JOBS PREFIX=/opt/daos \
TARGET_TYPE=$DAOS_TARGET_TYPE && \
([ "$DAOS_KEEP_BUILD" != "no" ] || /bin/rm -rf build *.gz); \
Expand All @@ -118,8 +120,7 @@ COPY --chown=daos_server:daos_server utils/sl utils/sl

# Build third party RPMs
RUN [ "$DAOS_PACKAGES_BUILD" != "yes" ] || [ "$DAOS_DEPS_BUILD" != "yes" ] || { \
if [ -n "$REPO_FILE_URL" ]; then direct="${REPO_FILE_URL##*//}; "\
direct="${direct%%/*}"; export no_proxy="${direct}"; fi; \
export DISTRO="el8" && \
utils/rpms/build_packages.sh deps && \
mkdir -p /home/daos/rpms && \
mv *.rpm /home/daos/rpms; \
Expand All @@ -129,10 +130,7 @@ USER root:root
# force an upgrade to get any newly built RPMs, but only if CB1 is set.
ARG CB1
RUN [ -z "$CB1" ] || { \
if [ -n "$REPO_FILE_URL" ]; then direct="${REPO_FILE_URL##*//}; " \
direct="${direct%%/*}"; export no_proxy="${direct}"; fi; \
dnf upgrade \
--exclude=spdk,spdk-devel,dpdk-devel,dpdk,mercury-devel,mercury && \
dnf upgrade --exclude=spdk,spdk-devel,dpdk-devel,dpdk,mercury-devel,mercury && \
dnf clean all; \
}
USER daos_server:daos_server
Expand All @@ -158,8 +156,6 @@ ARG DAOS_BUILD=$DAOS_DEPS_BUILD

# Build DAOS
RUN [ "$DAOS_BUILD" != "yes" ] || { \
if [ -n "$REPO_FILE_URL" ]; then direct="${REPO_FILE_URL##*//}; " \
direct="${direct%%/*}"; export no_proxy="${direct}"; fi; \
scons --jobs $JOBS install PREFIX=/opt/daos COMPILER=$COMPILER \
FIRMWARE_MGMT=1 BUILD_TYPE=$DAOS_BUILD_TYPE TARGET_TYPE=$DAOS_TARGET_TYPE && \
([ "$DAOS_KEEP_BUILD" != "no" ] || /bin/rm -rf build) && \
Expand All @@ -171,8 +167,6 @@ COPY --chown=daos_server:daos_server utils utils

# Build DAOS RPMs
RUN [ "$DAOS_PACKAGES_BUILD" != "yes" ] || [ "$DAOS_BUILD" != "yes" ] || { \
if [ -n "$REPO_FILE_URL" ]; then direct="${REPO_FILE_URL##*//}; " \
direct="${direct%%/*}"; export no_proxy="${direct}"; fi; \
utils/rpms/build_packages.sh daos && \
mkdir -p /home/daos/rpms && \
cp *.rpm /home/daos/rpms; \
Expand All @@ -188,8 +182,6 @@ WORKDIR /home/daos/daos/src/client/java
ARG DAOS_JAVA_BUILD=$DAOS_BUILD

RUN [ "$DAOS_JAVA_BUILD" != "yes" ] || { \
if [ -n "$REPO_FILE_URL" ]; then direct="${REPO_FILE_URL##*//}; " \
direct="${direct%%/*}"; export no_proxy="${direct}"; fi; \
mkdir /home/daos/.m2 && \
cp /home/daos/daos/utils/scripts/helpers/maven-settings.xml.in /home/daos/.m2/settings.xml && \
export JAVA_HOME=$(daos-java/find_java_home.sh) && \
Expand Down
10 changes: 10 additions & 0 deletions utils/docker/Dockerfile.el.9
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ ARG REPO_FILE_URL
ARG JENKINS_URL
ARG REPOS
ARG DAOS_LAB_CA_FILE_URL

# Accept DAOS_NO_PROXY at build time
ARG DAOS_NO_PROXY
# Propagate into the build environment
ENV no_proxy=${DAOS_NO_PROXY}
ENV NO_PROXY=${DAOS_NO_PROXY}
# Persist into /etc/environment for use by shells and services
RUN echo "no_proxy=${DAOS_NO_PROXY}" >> /etc/environment && \
echo "NO_PROXY=${DAOS_NO_PROXY}" >> /etc/environment

# script to install OS updates basic tools and daos dependencies
COPY ./utils/scripts/install-el9.sh /tmp/install.sh
# script to setup local repo if available
Expand Down
26 changes: 11 additions & 15 deletions utils/docker/Dockerfile.leap.15
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ ARG REPO_FILE_URL
ARG JENKINS_URL
ARG REPOS
ARG DAOS_LAB_CA_FILE_URL

# Accept DAOS_NO_PROXY at build time
ARG DAOS_NO_PROXY
# Propagate into the build environment
ENV no_proxy=${DAOS_NO_PROXY}
ENV NO_PROXY=${DAOS_NO_PROXY}
# Persist into /etc/environment for use by shells and services
RUN echo "no_proxy=${DAOS_NO_PROXY}" >> /etc/environment && \
echo "NO_PROXY=${DAOS_NO_PROXY}" >> /etc/environment

# script to install OS updates basic tools and daos dependencies
COPY ./utils/scripts/install-leap15.sh /tmp/install.sh
# script to setup local repo if available
Expand All @@ -38,9 +48,7 @@ FROM basic
# with a local repository, yet needing a proxy to reach outside repositories.
# This needs to be moved to a shell script like above in the future to
# properly only remove the proxy variables only when they need to be removed
RUN if [ -n "$REPO_FILE_URL" ]; then direct="${REPO_FILE_URL##*//}; "\
direct="${direct%%/*}"; export no_proxy="${direct}"; fi; \
dnf upgrade && \
RUN dnf upgrade && \
/tmp/install.sh && \
dnf clean all && \
rm -f /tmp/install.sh
Expand Down Expand Up @@ -96,8 +104,6 @@ ARG DAOS_PACKAGES_BUILD=yes
# The dnf upgrade can add or re-enable distro repositories.
USER root:root
RUN [ "$DAOS_DEPS_BUILD" != "yes" ] || { \
if [ -n "$REPO_FILE_URL" ]; then direct="${REPO_FILE_URL##*//}; " \
direct="${direct%%/*}"; export no_proxy="${direct}"; fi; \
dnf upgrade --exclude=fuse,fuse-libs,fuse-devel,libraft0,raft-devel,mercury,mercury-devel && \
dnf clean all; \
}
Expand All @@ -106,8 +112,6 @@ USER daos_server:daos_server
ARG DEPS_JOBS=1

RUN [ "$DAOS_DEPS_BUILD" != "yes" ] || { \
if [ -n "$REPO_FILE_URL" ]; then direct="${REPO_FILE_URL##*//}; "\
direct="${direct%%/*}"; export no_proxy="${direct}"; fi; \
scons --build-deps=only --jobs $DEPS_JOBS PREFIX=/opt/daos \
TARGET_TYPE=$DAOS_TARGET_TYPE && \
([ "$DAOS_KEEP_BUILD" != "no" ] || /bin/rm -rf build *.gz); \
Expand Down Expand Up @@ -140,17 +144,13 @@ RUN if [ "$COMPILER" = "icc" ]; then
rpm --import https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB && \
dnf config-manager --add-repo https://yum.repos.intel.com/oneapi oneAPI; \
fi; \
if [ -n "$REPO_FILE_URL" ]; then direct="${REPO_FILE_URL##*//}; "\
direct="${direct%%/*}"; export no_proxy="${direct}"; fi; \
dnf install intel-oneapi-compiler-dpcpp-cpp && \
dnf clean all; \
fi

# force an upgrade to get any newly built RPMs, but only if CB1 is set.
ARG CB1
RUN [ -z "$CB1" ] || { \
if [ -n "$REPO_FILE_URL" ]; then direct="${REPO_FILE_URL##*//}; " \
direct="${direct%%/*}"; export no_proxy="${direct}"; fi; \
dnf upgrade --exclude=fuse,fuse-libs,fuse-devel,libraft0,raft-devel,mercury,mercury-devel && \
dnf clean all; \
}
Expand All @@ -175,8 +175,6 @@ ARG DAOS_BUILD=$DAOS_DEPS_BUILD

# Build DAOS
RUN [ "$DAOS_BUILD" != "yes" ] || { \
if [ -n "$REPO_FILE_URL" ]; then direct="${REPO_FILE_URL##*//}; " \
direct="${direct%%/*}"; export no_proxy="${direct}"; fi; \
scons --jobs $JOBS install PREFIX=/opt/daos COMPILER=$COMPILER \
BUILD_TYPE=$DAOS_BUILD_TYPE TARGET_TYPE=$DAOS_TARGET_TYPE \
FIRMWARE_MGMT=1 && \
Expand Down Expand Up @@ -205,8 +203,6 @@ WORKDIR /home/daos/daos/src/client/java
ARG DAOS_JAVA_BUILD=$DAOS_BUILD

RUN [ "$DAOS_JAVA_BUILD" != "yes" ] || { \
if [ -n "$REPO_FILE_URL" ]; then direct="${REPO_FILE_URL##*//}; " \
direct="${direct%%/*}"; export no_proxy="${direct}"; fi; \
mkdir /home/daos/.m2 && \
cp /home/daos/daos/utils/scripts/helpers/maven-settings.xml.in /home/daos/.m2/settings.xml && \
mvn clean install -ntp -T 1C -DskipITs -Dgpg.skip -Ddaos.install.path=/opt/daos; \
Expand Down
10 changes: 10 additions & 0 deletions utils/docker/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ ENV DEBIAN_FRONTEND=noninteractive

# Install basic tools
ARG DAOS_LAB_CA_FILE_URL

# Accept DAOS_NO_PROXY at build time
ARG DAOS_NO_PROXY
# Propagate into the build environment
ENV no_proxy=${DAOS_NO_PROXY}
ENV NO_PROXY=${DAOS_NO_PROXY}
# Persist into /etc/environment for use by shells and services
RUN echo "no_proxy=${DAOS_NO_PROXY}" >> /etc/environment && \
echo "NO_PROXY=${DAOS_NO_PROXY}" >> /etc/environment

# script to setup local repo if available and install packages
COPY ./utils/scripts/helpers/repo-helper-ubuntu.sh /tmp/repo-helper.sh
COPY ./utils/scripts/install-ubuntu.sh /tmp/install.sh
Expand Down
15 changes: 7 additions & 8 deletions utils/scripts/helpers/repo-helper-el8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ if [ -n "$REPO_FILE_URL" ]; then
popd
# These may have been created in the Dockerfile must be removed
# when using a local repository.
unset HTTPS_PROXY
unset https_proxy
# unset HTTPS_PROXY
# unset https_proxy
fi
dnf -y --disablerepo \*epel\* install dnf-plugins-core
dnf -y config-manager --save --setopt=assumeyes=True
Expand Down Expand Up @@ -130,10 +130,9 @@ disable_repos /etc/yum.repos.d/ "${save_repos[@]}"
if [ -n "$REPO_FILE_URL" ]; then
trusted_host="${REPO_FILE_URL##*//}"
trusted_host="${trusted_host%%/*}"; \
{
echo "[global]"
echo "trusted-host = ${trusted_host}"
echo "index-url = https://${trusted_host}/artifactory/api/pypi/pypi-proxy/simple"
echo "proxy = \"\""
} > /etc/pip.conf
cat <<EOF > /etc/pip.conf
[global]
trusted-host = ${trusted_host}
index-url = https://${trusted_host}/artifactory/api/pypi/pypi-proxy/simple
EOF
fi
11 changes: 5 additions & 6 deletions utils/scripts/helpers/repo-helper-el9.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,9 @@ disable_repos /etc/yum.repos.d/ "${save_repos[@]}"
if [ -n "$REPO_FILE_URL" ]; then
trusted_host="${REPO_FILE_URL##*//}"
trusted_host="${trusted_host%%/*}"; \
{
echo "[global]"
echo "trusted-host = ${trusted_host}"
echo "index-url = https://${trusted_host}/artifactory/api/pypi/pypi-proxy/simple"
echo "proxy = "
} > /etc/pip.conf
cat <<EOF > /etc/pip.conf
[global]
trusted-host = ${trusted_host}
index-url = https://${trusted_host}/artifactory/api/pypi/pypi-proxy/simple
EOF
fi
11 changes: 5 additions & 6 deletions utils/scripts/helpers/repo-helper-leap15.sh
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,9 @@ update-ca-certificates
if [ -n "$REPO_FILE_URL" ]; then
trusted_host="${REPO_FILE_URL##*//}"
trusted_host="${trusted_host%%/*}"; \
{
echo "[global]"
echo "trusted-host = ${trusted_host}"
echo "index-url = https://${trusted_host}/artifactory/api/pypi/pypi-proxy/simple"
echo "proxy = \"\""
} > /etc/pip.conf
cat <<EOF > /etc/pip.conf
[global]
trusted-host = ${trusted_host}
index-url = https://${trusted_host}/artifactory/api/pypi/pypi-proxy/simple
EOF
fi
11 changes: 5 additions & 6 deletions utils/scripts/helpers/repo-helper-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,9 @@ apt-get clean all
if [ -n "$REPO_FILE_URL" ]; then
trusted_host="${REPO_FILE_URL##*//}"
trusted_host="${trusted_host%%/*}"; \
{
echo "[global]"
echo "trusted-host = ${trusted_host}"
echo "index-url = https://${trusted_host}/artifactory/api/pypi/pypi-proxy/simple"
echo "proxy = \"\""
} > /etc/pip.conf
cat <<EOF > /etc/pip.conf
[global]
trusted-host = ${trusted_host}
index-url = https://${trusted_host}/artifactory/api/pypi/pypi-proxy/simple
EOF
fi
Loading