review-stats: deploy new version of the app in staging
Signed-off-by: Clement Verna <cverna@tutanota.com>
This commit is contained in:
parent
e1538d32e4
commit
13f4934ac4
3 changed files with 51 additions and 0 deletions
1
roles/review-stats/build/files/review-stats-new.cron
Normal file
1
roles/review-stats/build/files/review-stats-new.cron
Normal file
|
@ -0,0 +1 @@
|
|||
0,30 * * * * apache /usr/local/bin/review-stats.py -d /srv/web/review-stats/
|
|
@ -7,6 +7,10 @@
|
|||
- review-stats
|
||||
- review-stats/build
|
||||
|
||||
- name: Install new version of the app
|
||||
package: name=python-review_stats state=present
|
||||
when: env == "staging"
|
||||
|
||||
- name: Ensure dir for content exists
|
||||
file: dest=/srv/web/review-stats owner=apache group=apache mode=0755 state=directory
|
||||
tags:
|
||||
|
@ -20,18 +24,21 @@
|
|||
tags:
|
||||
- review-stats
|
||||
- review-stats/build
|
||||
when: env != "staging"
|
||||
|
||||
- name: Create /usr/local/share/review-stats
|
||||
file: path=/usr/local/share/review-stats state=directory owner=root group=root
|
||||
tags:
|
||||
- review-stats
|
||||
- review-stats/build
|
||||
when: env != "staging"
|
||||
|
||||
- name: Copy templates
|
||||
synchronize: src=templates dest=/usr/local/share/review-stats/
|
||||
tags:
|
||||
- review-stats
|
||||
- review-stats/build
|
||||
when: env != "staging"
|
||||
|
||||
- name: Copy config file
|
||||
template: >
|
||||
|
@ -41,6 +48,17 @@
|
|||
tags:
|
||||
- review-stats
|
||||
- review-stats/build
|
||||
when: env != "staging"
|
||||
|
||||
- name: Copy config file
|
||||
template: >
|
||||
src=review-stats-new.cfg
|
||||
dest=/etc/review-stats.cfg
|
||||
owner=apache group=root mode=0600
|
||||
tags:
|
||||
- review-stats
|
||||
- review-stats/build
|
||||
when: env == "staging"
|
||||
|
||||
- name: Install the review-stats cronjob
|
||||
copy: >
|
||||
|
@ -50,3 +68,14 @@
|
|||
- cron
|
||||
- review-stats
|
||||
- review-stats/build
|
||||
when: env != "staging"
|
||||
|
||||
- name: Install the review-stats cronjob
|
||||
copy: >
|
||||
src=review-stats-new.cron dest=/etc/cron.d/review-stats.cron
|
||||
owner=root group=root mode=0644
|
||||
tags:
|
||||
- cron
|
||||
- review-stats
|
||||
- review-stats/build
|
||||
when: env == "staging"
|
||||
|
|
21
roles/review-stats/build/templates/review-stats-new.cfg
Normal file
21
roles/review-stats/build/templates/review-stats-new.cfg
Normal file
|
@ -0,0 +1,21 @@
|
|||
[review-stats]
|
||||
{% if env == "staging" %}
|
||||
url = "https://partner-bugzilla.redhat.com/xmlrpc.cgi"
|
||||
{% else %}
|
||||
url = "https://bugzilla.redhat.com/xmlrpc.cgi"
|
||||
{% endif %}
|
||||
username = "package-review@lists.fedoraproject.org"
|
||||
password = "{{ packagereviewbugzilla }}"
|
||||
# bugzilla_api_key = KEY
|
||||
|
||||
[review-stats-logging]
|
||||
journal_level = INFO
|
||||
# Be aware these adresses will receive one email for each log message sent to the queue
|
||||
# Using a level lower than ERROR is discouraged
|
||||
mail_level = ERROR
|
||||
# mail_server = <SERVER:PORT>
|
||||
# mail_username = <USERNAME>
|
||||
# mail_password = <PASSWORD>
|
||||
# mail_secure = true
|
||||
# mail_from = <FROM_ADDRESS_
|
||||
# mail_to = <TO_ADDRESSES_COMMA_SEPARATED>
|
Loading…
Add table
Add a link
Reference in a new issue