From 21eae1f446be3faa1764f800bdd0a2d34a6d5f0a Mon Sep 17 00:00:00 2001 From: Jan Kaluza Date: Apr 05 2018 19:34:18 +0000 Subject: [PATCH 1/2] Add python2-psycopg2 to requirements --- diff --git a/.copr/freshmaker.spec.in b/.copr/freshmaker.spec.in index 02d5836..7d0126f 100644 --- a/.copr/freshmaker.spec.in +++ b/.copr/freshmaker.spec.in @@ -54,6 +54,7 @@ BuildRequires: pyOpenSSL BuildRequires: python-six BuildRequires: python-sqlalchemy BuildRequires: koji +BuildRequires: python-psycopg2 %else BuildRequires: python2-setuptools BuildRequires: python2-fedora @@ -67,6 +68,7 @@ BuildRequires: python2-pyOpenSSL BuildRequires: python2-six BuildRequires: python2-sqlalchemy BuildRequires: python2-koji +BuildRequires: python2-psycopg2 %endif BuildRequires: systemd @@ -105,6 +107,7 @@ Requires: python-six Requires: python-sqlalchemy Requires: koji Requires: systemd-python +Requires: python-psycopg2 %else Requires: python2-koji Requires: python2-fedora @@ -117,6 +120,7 @@ Requires: python2-pyOpenSSL Requires: python2-six Requires: python2-sqlalchemy Requires: python2-systemd +Requires: python2-psycopg2 %endif From fe52d0cf69a483494104f1f798ea67f05ad19be5 Mon Sep 17 00:00:00 2001 From: Jan Kaluza Date: Apr 06 2018 13:56:10 +0000 Subject: [PATCH 2/2] Install CA-cert in Dockerfile --- diff --git a/Dockerfile b/Dockerfile index 6de1720..d752814 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,7 @@ LABEL \ build-date="" # The caller should build a Freshmaker RPM package and then pass it in this arg. ARG freshmaker_rpm +ARG cacert_url=undefined COPY $freshmaker_rpm /tmp RUN dnf -y install \ @@ -13,6 +14,12 @@ RUN dnf -y install \ && dnf -y clean all \ && rm -f /tmp/* +RUN if [ "$cacert_url" != "undefined" ]; then \ + cd /etc/pki/ca-trust/source/anchors \ + && curl -O --insecure $cacert_url \ + && update-ca-trust extract; \ + fi + USER 1001 EXPOSE 8080 diff --git a/Jenkinsfile b/Jenkinsfile index 7cc3d2a..2750520 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -71,7 +71,7 @@ node('docker') { /* Note that the docker.build step has some magic to guess the * Dockerfile used, which will break if the build directory (here ".") * is not the final argument in the string. */ - def image = docker.build "factory2/freshmaker:${appversion}", "--build-arg freshmaker_rpm=$f26_rpm ." + def image = docker.build "factory2/freshmaker:${appversion}", "--build-arg freshmaker_rpm=$f26_rpm --build-arg cacert_url=https://password.corp.redhat.com/RH-IT-Root-CA.crt ." image.push() } /* Save container version for later steps (this is ugly but I can't find anything better...) */