forked from infra/ansible
docstranslation: Use git token instead of ssh key
This commit is contained in:
parent
0a8e3dbe21
commit
e0922f3d6c
3 changed files with 18 additions and 19 deletions
|
|
@ -11,11 +11,11 @@ spec:
|
|||
runPolicy: Serial
|
||||
source:
|
||||
git:
|
||||
uri: "https://pagure.io/fedora-docs/translations-scripts.git"
|
||||
uri: "https://forge.fedoraproject.org/docs/translations-scripts.git"
|
||||
{% if env == 'staging' %}
|
||||
ref: staging
|
||||
{% else %}
|
||||
ref: master
|
||||
ref: main
|
||||
{% endif %}
|
||||
strategy:
|
||||
type: Docker
|
||||
|
|
|
|||
|
|
@ -4,11 +4,10 @@ kind: CronJob
|
|||
metadata:
|
||||
name: cron
|
||||
spec:
|
||||
suspend: true
|
||||
suspend: false
|
||||
concurrencyPolicy: Forbid
|
||||
schedule: "0 21 * * *"
|
||||
startingDeadlineSeconds: 600
|
||||
suspend: true
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
|
|
@ -26,20 +25,24 @@ spec:
|
|||
{% if env == 'staging' %}
|
||||
- "--nopush"
|
||||
{% endif %}
|
||||
env: []
|
||||
env:
|
||||
- name: UPDATE_DOCS_TRANS_SEC
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: git-token
|
||||
key: token
|
||||
- name: UPDATE_DOCS_TRANS_NAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: git-token
|
||||
key: token_name
|
||||
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
|
||||
volumes:
|
||||
- name: ssh-config-volume
|
||||
secret:
|
||||
secretName: ssh-config
|
||||
- name: mail-config-volume
|
||||
configMap:
|
||||
name: mail-config
|
||||
|
|
|
|||
|
|
@ -2,14 +2,10 @@
|
|||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: ssh-config
|
||||
name: git-token
|
||||
labels:
|
||||
app: docstranslation
|
||||
stringData:
|
||||
id_rsa_docs_trans: |-
|
||||
{{ lookup('file', ssh_key_path) | indent(4) }}
|
||||
config: |-
|
||||
Host pagure.io
|
||||
User git
|
||||
IdentityFile /workspace/.ssh/id_rsa_docs_trans
|
||||
StrictHostKeyChecking no
|
||||
token: "{{docstranslation_git_token}}"
|
||||
token_name: "weblatebot"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue