diff options
author | Paul Sokolovsky <paul.sokolovsky@linaro.org> | 2015-01-10 22:06:45 +0200 |
---|---|---|
committer | Paul Sokolovsky <paul.sokolovsky@linaro.org> | 2015-01-10 22:06:45 +0200 |
commit | 3b542e1af7ea15a66776b1814cbbe85997674f44 (patch) | |
tree | dd820ac1e42e48c11e50b9546a5cad221e6955a7 | |
parent | 39be0aeb3d5bc3c9f4c511611b4cb1af6fe99023 (diff) |
git-server: Convert "cron" action to cronjob template.
Change-Id: Id1a1c8bf857da2a5688352c6cc49607150ca0414
-rw-r--r-- | per-service/git-servers/roles/cronjobs/tasks/main.yml | 13 | ||||
-rw-r--r-- | per-service/git-servers/roles/cronjobs/templates/gitserver | 13 |
2 files changed, 11 insertions, 15 deletions
diff --git a/per-service/git-servers/roles/cronjobs/tasks/main.yml b/per-service/git-servers/roles/cronjobs/tasks/main.yml index 87feefaf..88b784e3 100644 --- a/per-service/git-servers/roles/cronjobs/tasks/main.yml +++ b/per-service/git-servers/roles/cronjobs/tasks/main.yml @@ -24,19 +24,6 @@ - cron - android -- name: Setup cront to create clone.bundle files (git-main) - cron: name="Create clone bundles" - job="{{ tools_checkout_dir }}/linaro-git-tools/bundles/create-bundle.py --repo-list {{ tools_checkout_dir }}/git-main-bundle-include.txt" - minute=3 - hour=3 - weekday=0 - user={{ git_user }} - cron_file=gitserver - when: hosttype == "git-main" - tags: - - cron - - git - - name: Setup include bundle file for git main server copy: src=git-main-bundle-include.txt dest={{ tools_checkout_dir }}/git-main-bundle-include.txt diff --git a/per-service/git-servers/roles/cronjobs/templates/gitserver b/per-service/git-servers/roles/cronjobs/templates/gitserver index aa6f6650..9a883661 100644 --- a/per-service/git-servers/roles/cronjobs/templates/gitserver +++ b/per-service/git-servers/roles/cronjobs/templates/gitserver @@ -6,12 +6,21 @@ MAILTO=linaro-infrastructure-errors@lists.linaro.org #Ansible: Fallback git update-server-info cronjob 55 * * * * {{git_user}} {{tools_checkout_dir}}/linaro-git-tools/update-server-info-fallback.sh +{% endif %} + +{% if hosttype == "git-main" %} +#Ansible: Clean trashed repositories +2 5 * * * {{git_user}} {{tools_checkout_dir}}/linaro-git-tools/clean-trash-repo.py +{% endif %} +{# TODO: refactor below #} + +{% if hosttype == "git-android" %} #Ansible: Create clone bundles 3 3 * * 0 {{git_user}} {{tools_checkout_dir}}/linaro-git-tools/bundles/create-bundle.py --exclude-list {{tools_checkout_dir}}/git-android-bundle-exclude.txt {% endif %} {% if hosttype == "git-main" %} -#Ansible: Clean trashed repositories -2 5 * * * {{git_user}} {{tools_checkout_dir}}/linaro-git-tools/clean-trash-repo.py +#Ansible: Create clone bundles +3 3 * * 0 git /home/ubuntu/linaro-git-tools/bundles/create-bundle.py --repo-list /home/ubuntu/git-main-bundle-include.txt {% endif %} |