diff --git a/playbooks/openshift-apps/docstranslation.yml b/playbooks/openshift-apps/docstranslation.yml index f5ac5aefe2..594fb7ab23 100644 --- a/playbooks/openshift-apps/docstranslation.yml +++ b/playbooks/openshift-apps/docstranslation.yml @@ -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 diff --git a/roles/openshift-apps/docstranslation/templates/configmap.yml b/roles/openshift-apps/docstranslation/templates/configmap.yml new file mode 100644 index 0000000000..32595e516b --- /dev/null +++ b/roles/openshift-apps/docstranslation/templates/configmap.yml @@ -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 %} diff --git a/roles/openshift-apps/docstranslation/templates/cron.yml b/roles/openshift-apps/docstranslation/templates/cron.yml index 62bc541fc2..2e71faaa6d 100644 --- a/roles/openshift-apps/docstranslation/templates/cron.yml +++ b/roles/openshift-apps/docstranslation/templates/cron.yml @@ -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