diff --git a/roles/openshift-apps/bodhi/templates/buildconfig.yml b/roles/openshift-apps/bodhi/templates/buildconfig.yml index 7436a79983..91e1321ca6 100644 --- a/roles/openshift-apps/bodhi/templates/buildconfig.yml +++ b/roles/openshift-apps/bodhi/templates/buildconfig.yml @@ -11,12 +11,12 @@ items: runPolicy: Serial source: dockerfile: |- - {{ load_file('dockerfile-base') | indent(8) }} + {{ load_file('dockerfile-base-hotfix') | indent(8) }} type: Dockerfile strategy: type: Docker dockerStrategy: - noCache: false + noCache: True output: to: kind: ImageStreamTag diff --git a/roles/openshift-apps/bodhi/templates/dockerfile-base-hotfix b/roles/openshift-apps/bodhi/templates/dockerfile-base-hotfix new file mode 100644 index 0000000000..265c49260d --- /dev/null +++ b/roles/openshift-apps/bodhi/templates/dockerfile-base-hotfix @@ -0,0 +1,42 @@ +FROM fedora:34 +MAINTAINER asaleh@redhat.com +ENV VERSION=5.7.2 +ENV COMMIT=b758a4caeeeff639edb51e4e6ee8b634c4dce930 +ENV SPECURL=https://gist.githubusercontent.com/AdamSaleh/1919b8ec41075e415613e033086a6054/raw/dafdc31d243530a3ee4ede0a15dfb394176600bc/bodhi.spec +RUN dnf -y install fedora-packager wget curl +RUN yum -y install rpm-build redhat-rpm-config make gcc git vi tar unzip rpmlint && yum clean all +RUN curl $SPECURL -o /tmp/bodhi.spec +RUN dnf -y builddep --spec /tmp/bodhi.spec +RUN useradd rpmbuild -u 5002 -g users -p rpmbuild +USER rpmbuild +ENV HOME /home/rpmbuild +WORKDIR /home/rpmbuild +RUN curl $SPECURL -o /home/rpmbuild/bodhi.spec +RUN mkdir -p /home/rpmbuild/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} +RUN echo '%_topdir %{getenv:HOME}/rpmbuild' > /home/rpmbuild/.rpmmacros +RUN wget https://github.com/fedora-infra/bodhi/archive/${COMMIT}.tar.gz +RUN mv ${COMMIT}.tar.gz /home/rpmbuild/rpmbuild/SOURCES/bodhi-${COMMIT}.tar.gz +RUN sed -i "s/891564724f08124c3272e2f16717b41fd9a56e78/${COMMIT}/g" /home/rpmbuild/bodhi.spec +RUN sed -i "s/5\.7\.1/${VERSION}/g" /home/rpmbuild/bodhi.spec +RUN rpmbuild --define "commit ${COMMIT}" -ba /home/rpmbuild/bodhi.spec + +FROM fedora:34 + +LABEL \ + name="bodhi-base" \ + vendor="Fedora Infrastructure" \ + license="MIT" +RUN curl -o /etc/yum.repos.d/infra-tags-stg.repo https://infrastructure.fedoraproject.org/infra/ansible/files/common/fedora-infra-tags-stg.repo + +# While dnf has a --nodocs, it doesen't have a --docs... + +RUN sed -i '/nodocs/d' /etc/dnf/dnf.conf +COPY --from=0 /home/rpmbuild/rpmbuild/RPMS /tmp/RPMS + +RUN dnf install -y /tmp/RPMS/noarch/* python3-pyramid_sawing python3-gunicorn + +# Set up krb5 +RUN rm -f /etc/krb5.conf && \ + ln -sf /etc/bodhi/krb5.conf /etc/krb5.conf && \ + ln -sf /etc/keytabs/koji-keytab /etc/krb5.bodhi_bodhi.stg.fedoraproject.org.keytab +ENV USER=openshift \ No newline at end of file