Add a job to update translation
See https://pagure.io/fedora-infrastructure/issue/8691
This commit is contained in:
parent
a512f15c52
commit
547f5bc938
4 changed files with 66 additions and 0 deletions
|
@ -45,6 +45,8 @@
|
||||||
when: master_sundries_node|bool
|
when: master_sundries_node|bool
|
||||||
- role: fedora-docs/build
|
- role: fedora-docs/build
|
||||||
when: master_sundries_node|bool
|
when: master_sundries_node|bool
|
||||||
|
- role: fedora-docs/translation
|
||||||
|
when: master_sundries_node|bool
|
||||||
- role: membership-map/build
|
- role: membership-map/build
|
||||||
when: master_sundries_node|bool
|
when: master_sundries_node|bool
|
||||||
- role: developer/build
|
- role: developer/build
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
MAILTO=jibecfed
|
||||||
|
0 2 * * * _update_docs_trans /usr/local/bin/lock-wrapper cron-docs-translation-update "/usr/local/bin/docs-translation-update"
|
15
roles/fedora-docs/translation/files/docs-translation-update
Normal file
15
roles/fedora-docs/translation/files/docs-translation-update
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/bash
|
||||||
|
OLD=$(mktemp -d -t fedora_docs_trans_XXXX)
|
||||||
|
cd $OLD
|
||||||
|
|
||||||
|
function clean_tmp() {
|
||||||
|
[ -n "$OLD" ] && echo rm -Rf "$OLD"
|
||||||
|
}
|
||||||
|
|
||||||
|
trap clean_tmp exit
|
||||||
|
|
||||||
|
git clone https://pagure.io/fedora-docs/translations-scripts.git
|
||||||
|
cd translations-scripts
|
||||||
|
./build.py --clone_sources true --commit_l10n true --commit_tsources true --clone-po4a
|
||||||
|
./stats/compute.sh
|
||||||
|
|
47
roles/fedora-docs/translation/tasks/main.yml
Normal file
47
roles/fedora-docs/translation/tasks/main.yml
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
- name: Install packages
|
||||||
|
package:
|
||||||
|
name:
|
||||||
|
- po4a
|
||||||
|
- git
|
||||||
|
- perl-gettext
|
||||||
|
- perl-Pod-Parser
|
||||||
|
- perl(YAML::Tiny)
|
||||||
|
- perl(Unicode::GCString)
|
||||||
|
state: present
|
||||||
|
tags:
|
||||||
|
- fedora-docs-translation
|
||||||
|
|
||||||
|
- name: Create a non root user to run the code
|
||||||
|
user:
|
||||||
|
name: _update_docs_trans
|
||||||
|
generate_ssh_key: yes
|
||||||
|
ssh_key_file: .ssh/id_rsa_docs_trans
|
||||||
|
tags:
|
||||||
|
- fedora-docs-translation
|
||||||
|
|
||||||
|
# the key is going to be added to pagure for pushing
|
||||||
|
- name: Display the public key
|
||||||
|
command: cat ~_update_docs_trans/.ssh/id_rsa_docs_trans.pub
|
||||||
|
tags:
|
||||||
|
- fedora-docs-translation
|
||||||
|
|
||||||
|
- copy:
|
||||||
|
src: docs-translation-update
|
||||||
|
dest: /usr/local/bin/docs-translation-update
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0755
|
||||||
|
tags:
|
||||||
|
- fedora-docs-translation
|
||||||
|
|
||||||
|
- copy:
|
||||||
|
src: cron-docs-translation-update
|
||||||
|
dest: /etc/cron.d/cron-docs-translation-update
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0644
|
||||||
|
tags:
|
||||||
|
- fedora-docs-translation
|
||||||
|
when: env == "production"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue