From 2cfbf235bc5f8ce00c65e5c83f79817de4a2f604 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Tue, 17 Dec 2019 17:36:44 +0100 Subject: [PATCH] distgit-bz: make the cron a template and never notify users in staging Signed-off-by: Pierre-Yves Chibon --- playbooks/openshift-apps/distgit_bugzilla_sync.yml | 2 +- .../distgit-bugzilla-sync/{files => templates}/cron.yml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) rename roles/openshift-apps/distgit-bugzilla-sync/{files => templates}/cron.yml (90%) diff --git a/playbooks/openshift-apps/distgit_bugzilla_sync.yml b/playbooks/openshift-apps/distgit_bugzilla_sync.yml index 9f956adaac..a7e80c18df 100644 --- a/playbooks/openshift-apps/distgit_bugzilla_sync.yml +++ b/playbooks/openshift-apps/distgit_bugzilla_sync.yml @@ -33,7 +33,7 @@ - role: openshift/object app: distgit-bugzilla-sync - file: cron.yml + template: cron.yml objectname: cron.yml tags: - cron-job diff --git a/roles/openshift-apps/distgit-bugzilla-sync/files/cron.yml b/roles/openshift-apps/distgit-bugzilla-sync/templates/cron.yml similarity index 90% rename from roles/openshift-apps/distgit-bugzilla-sync/files/cron.yml rename to roles/openshift-apps/distgit-bugzilla-sync/templates/cron.yml index a9b6dd8eeb..da81e16012 100644 --- a/roles/openshift-apps/distgit-bugzilla-sync/files/cron.yml +++ b/roles/openshift-apps/distgit-bugzilla-sync/templates/cron.yml @@ -22,8 +22,13 @@ spec: containers: - name: distgit-bugzilla-sync image: docker-registry.default.svc:5000/distgit-bugzilla-sync/distgit-bugzilla-sync:latest +{% if env == 'staging' %} + command: ["/usr/local/bin/distgit-bugzilla-sync", "--verbose", "--no-user-notifications", + "--add-config-file=/etc/distgit-bugzilla-sync/configuration.toml"] +{% else } command: ["/usr/local/bin/distgit-bugzilla-sync", "--verbose", "--add-config-file=/etc/distgit-bugzilla-sync/configuration.toml"] +{% endif %} volumeMounts: - name: config-volume mountPath: /etc/distgit-bugzilla-sync