From 52987bfa733221a6558f394412cb14dcad3f5fa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kone=C4=8Dn=C3=BD?= Date: Wed, 20 Jan 2021 13:36:03 +0100 Subject: [PATCH] release-monitoring: Don't use cached layers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The cached layers were root issue of having outdated anitya date, because the step wasn't run again if there was no change in the Dockerfile for the step, the cached version was used instead. Signed-off-by: Michal Konečný --- .../release-monitoring/files/deploymentconfig.yml | 2 +- .../release-monitoring/templates/buildconfig.yml | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/roles/openshift-apps/release-monitoring/files/deploymentconfig.yml b/roles/openshift-apps/release-monitoring/files/deploymentconfig.yml index 8005dc2c68..540acaf466 100644 --- a/roles/openshift-apps/release-monitoring/files/deploymentconfig.yml +++ b/roles/openshift-apps/release-monitoring/files/deploymentconfig.yml @@ -19,7 +19,7 @@ items: failurePolicy: Abort execNewPod: containerName: release-monitoring-web - command: [ /bin/sh, -i, -c, "ls -l /usr/local/lib/python3.8/site-packages/anitya/db/migrations/versions/;alembic-3 -c /etc/anitya/alembic.ini history; alembic-3 -c /etc/anitya/alembic.ini upgrade head" ] + command: [ /bin/sh, -i, -c, "alembic-3 -c /etc/anitya/alembic.ini upgrade head" ] volumes: - config-volume resources: {} diff --git a/roles/openshift-apps/release-monitoring/templates/buildconfig.yml b/roles/openshift-apps/release-monitoring/templates/buildconfig.yml index e608ef83ea..3ffd482f81 100644 --- a/roles/openshift-apps/release-monitoring/templates/buildconfig.yml +++ b/roles/openshift-apps/release-monitoring/templates/buildconfig.yml @@ -44,7 +44,7 @@ items: python3-wtforms && \ dnf autoremove -y && \ dnf clean all -y - RUN echo $(git clone https://github.com/fedora-infra/anitya.git && \ + RUN git clone https://github.com/fedora-infra/anitya.git && \ pushd anitya && \ {% if env == 'staging' %} git checkout staging && \ @@ -65,7 +65,7 @@ items: pip-3 install . && \ popd && \ popd && \ - rm -rf anitya) + rm -rf anitya # Let's use staging auth server in staging {% if env == 'staging' %} RUN sed -i 's/id.fedoraproject.org/id.stg.fedoraproject.org/g' /usr/lib/python3.8/site-packages/social_core/backends/fedora.py @@ -84,6 +84,8 @@ items: {% endif %} strategy: type: Docker + dockerStrategy: + noCache: true output: to: kind: ImageStreamTag