Skip to content

Commit

Permalink
Merge pull request #1189 from opendevstack/experimental
Browse files Browse the repository at this point in the history
Fixes for UBI8 base images
  • Loading branch information
victorpablosceruelo authored Oct 3, 2022
2 parents dd704c6 + 1f6a160 commit 41445e8
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
6 changes: 1 addition & 5 deletions jenkins/master/Dockerfile.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ ENV TAILOR_VERSION=1.3.4

USER root

COPY ./import_certs.sh /usr/local/bin/import_certs.sh
COPY ./ensure_java_jre_is_adequate.sh /usr/local/bin/ensure_java_jre_is_adequate.sh
COPY ./fix_openshift_scripts.sh /usr/local/bin/fix_openshift_scripts.sh
COPY ./clean_yum_cache.sh /usr/local/bin/clean_yum_cache.sh
COPY ./scripts_for_usr-local-bin/* /usr/local/bin/
RUN import_certs.sh \
&& rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key \
&& ensure_java_jre_is_adequate.sh master \
Expand All @@ -31,7 +28,6 @@ RUN import_certs.sh \

# Copy configuration and plugins.
COPY plugins.centos7.txt /opt/openshift/configuration/plugins.txt
COPY kube-slave-common.sh /usr/local/bin/kube-slave-common.sh
RUN /usr/local/bin/install-plugins.sh /opt/openshift/configuration/plugins.txt \
&& rm -r /opt/openshift/configuration/jobs/OpenShift* || true \
&& touch /var/lib/jenkins/configured \
Expand Down
6 changes: 1 addition & 5 deletions jenkins/master/Dockerfile.rhel7
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ ENV TAILOR_VERSION=1.3.4

USER root

COPY ./import_certs.sh /usr/local/bin/import_certs.sh
COPY ./ensure_java_jre_is_adequate.sh /usr/local/bin/ensure_java_jre_is_adequate.sh
COPY ./fix_openshift_scripts.sh /usr/local/bin/fix_openshift_scripts.sh
COPY ./clean_yum_cache.sh /usr/local/bin/clean_yum_cache.sh
COPY ./scripts_for_usr-local-bin/* /usr/local/bin/
RUN import_certs.sh \
&& rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key \
&& ensure_java_jre_is_adequate.sh master \
Expand All @@ -25,7 +22,6 @@ RUN import_certs.sh \

# Copy configuration and plugins.
COPY plugins.rhel7.txt /opt/openshift/configuration/plugins.txt
COPY kube-slave-common.sh /usr/local/bin/kube-slave-common.sh
RUN /usr/local/bin/install-plugins.sh /opt/openshift/configuration/plugins.txt \
&& rm -r /opt/openshift/configuration/jobs/OpenShift* || true \
&& touch /var/lib/jenkins/configured \
Expand Down
11 changes: 3 additions & 8 deletions jenkins/master/Dockerfile.ubi8
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,17 @@ ENV TAILOR_VERSION=1.3.4

USER root

COPY ./import_certs.sh /usr/local/bin/import_certs.sh
COPY ./ensure_java_jre_is_adequate.sh /usr/local/bin/ensure_java_jre_is_adequate.sh
COPY ./fix_openshift_scripts.sh /usr/local/bin/fix_openshift_scripts.sh
COPY ./clean_yum_cache.sh /usr/local/bin/clean_yum_cache.sh
COPY ./scripts_for_usr-local-bin/* /usr/local/bin/
RUN import_certs.sh \
&& rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key \
&& sed -i 's|enabled\s*=\s*1|enabled=0|g' /etc/yum.repos.d/ci-rpm-mirrors.repo \
&& sed -i 's|enabled\s*=\s*1|enabled=0|g' /etc/yum.repos.d/localdev-* \
&& sed -i 's|enabled\s*=\s*1|enabled=0|g' /etc/yum.repos.d/epel.repo \
&& disable_yum_repository.sh /etc/yum.repos.d/ci-rpm-mirrors.repo \
/etc/yum.repos.d/localdev-* /etc/yum.repos.d/epel.repo \
&& ensure_java_jre_is_adequate.sh master \
&& fix_openshift_scripts.sh \
&& clean_yum_cache.sh

# Copy configuration and plugins.
COPY plugins.ubi8.txt /opt/openshift/configuration/plugins.txt
COPY kube-slave-common.sh /usr/local/bin/kube-slave-common.sh
RUN /usr/local/bin/install-plugins.sh /opt/openshift/configuration/plugins.txt \
&& rm -r /opt/openshift/configuration/jobs/OpenShift* || true \
&& touch /var/lib/jenkins/configured \
Expand Down
File renamed without changes.
13 changes: 13 additions & 0 deletions jenkins/master/scripts_for_usr-local-bin/disable_yum_repository.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
set -eu -o pipefail

ME="$(basename $0)"

for filepath in $@; do
if [ -f ${filepath} ]; then
sed -i 's|enabled\s*=\s*1|enabled=0|g' ${filepath}
grep --with-filename 'enabled\s*=' ${filepath}
else
echo "File does not exist: ${filepath}"
fi
done
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 41445e8

Please sign in to comment.