docstranslation: include mail configuration

This commit is contained in:
Francois Andrieu 2020-11-14 17:52:29 +01:00 committed by kevin
parent b91a56c21f
commit a36cb952a2
3 changed files with 37 additions and 7 deletions

View file

@ -52,6 +52,15 @@
tags:
- deploy-secrets
- name: Define configMap
include_role:
name: openshift/object
vars:
objectname: configmap.yml
template: configmap.yml
tags:
- deploy-config
- name: Define cron job
include_role:
name: openshift/object

View file

@ -0,0 +1,17 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: mail-config
labels:
app: {{ app }}
data:
config.ini: |
[mail]
relayHost=bastion.fedoraproject.org
{% if env == 'staging' %}
subjectPrefix=[docstranslation staging]
recipient=darknao
{% else %}
subjectPrefix=[docstranslation]
recipient=jibecfed
{% endif %}

View file

@ -15,25 +15,29 @@ spec:
containers:
- name: translate
image: docker-registry.default.svc:5000/docstranslation/builder:latest
command:
- /workspace/build.py
args:
- "--clone_sources"
- "true"
{# Both environment get commit disabled for safety reasons for now
TODO: Set these to true on production when old app is removed from sundries #}
- "--commit_l10n"
- "{% if env == 'staging' %}false{% else %}false{% endif %}"
- "--commit_tsources"
- "{% if env == 'staging' %}false{% else %}false{% endif %}"
{% if env == 'staging' %}
- "--nopush"
{% endif %}
- "--clone-po4a"
env: []
volumeMounts:
- name: ssh-config-volume
mountPath: /workspace/.ssh
readOnly: true
- name: mail-config-volume
mountPath: /workspace/config.ini
subPath: config.ini
readOnly: true
restartPolicy: Never
startingDeadlineSeconds: 600
volumes:
- name: ssh-config-volume
secret:
secretName: ssh-config
- name: mail-config-volume
configMap:
name: mail-config