From 04f95e1969273ad683c9292f4abeb6e15542f2f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Bompard?= Date: Wed, 11 Oct 2023 07:23:13 +0200 Subject: [PATCH] Rebuild Maubot when the Fedora image changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Aurélien Bompard --- .../maubot/files/imagestream.yml | 19 +++++++++++++++++++ .../maubot/templates/buildconfig.yml | 19 ++++++++----------- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/roles/openshift-apps/maubot/files/imagestream.yml b/roles/openshift-apps/maubot/files/imagestream.yml index 296e8e9172..4b4c27f368 100644 --- a/roles/openshift-apps/maubot/files/imagestream.yml +++ b/roles/openshift-apps/maubot/files/imagestream.yml @@ -6,3 +6,22 @@ items: kind: ImageStream metadata: name: maubot + # The Fedora image + - apiVersion: image.openshift.io/v1 + kind: ImageStream + metadata: + name: fedora + labels: + build: maubot-build + spec: + lookupPolicy: + local: false + tags: + - name: "38" + from: + kind: DockerImage + name: quay.io/fedora/fedora:38 + importPolicy: + scheduled: true + referencePolicy: + type: Source diff --git a/roles/openshift-apps/maubot/templates/buildconfig.yml b/roles/openshift-apps/maubot/templates/buildconfig.yml index ac5329fb0c..8c35b0141c 100644 --- a/roles/openshift-apps/maubot/templates/buildconfig.yml +++ b/roles/openshift-apps/maubot/templates/buildconfig.yml @@ -32,19 +32,16 @@ spec: type: Docker dockerStrategy: noCache: false - # from: - # kind: ImageStreamTag - # name: fedora:38 + from: + kind: ImageStreamTag + name: fedora:38 output: to: kind: ImageStreamTag name: maubot:latest triggers: - - type: ConfigChange - - type: ImageChange - - type: GitHub - github: - secret: "{{ (env == 'production')|ternary(maubot_prod_github_secret, maubot_stg_github_secret) }}" - - type: Generic - generic: - secret: "{{ (env == 'production')|ternary(maubot_prod_github_secret, maubot_stg_github_secret) }}" + - type: ConfigChange + - type: ImageChange + - type: Generic + generic: + secret: "{{ (env == 'production')|ternary(maubot_prod_github_secret, maubot_stg_github_secret) }}"