Export PDC branches in a JSON file.

This commit is contained in:
Ralph Bean 2017-12-12 19:47:16 +00:00
parent e9d85a10b7
commit 88e9b62d57
2 changed files with 27 additions and 0 deletions

View file

@ -50,6 +50,14 @@
- pdc
- cron
- name: cron to generate cache of active component branches for pagure-sync-bugzilla
cron: name="export-branches" minute="15" user="apache"
job="/usr/local/bin/lock-wrapper export-branches 'python /usr/lib/python2.7/site-packages/pdc/manage.py exportbranches > /var/www/html/extras/active_branches.json'"
cron_file=export-branches
tags:
- pdc
- cron
- name: Copy over httpd config
template: src=pdc.conf dest=/etc/httpd/conf.d/pdc.conf
notify: reload httpd

View file

@ -31,6 +31,10 @@ WSGIScriptAlias / /usr/lib/python2.7/site-packages/pdc/wsgi.py
# Try to find them in the patternfly files
RewriteRule "^/static/(.*)" "/usr/share/patternfly1/resources/$1" [L]
# An entry for our exported branches
RewriteCond "/var/www/html/extras/$1" -f
RewriteRule "^/extras/(.*)" "/var/www/html/extras/$1" [L]
<Location "/">
SetHandler wsgi-script
@ -85,6 +89,21 @@ WSGIScriptAlias / /usr/lib/python2.7/site-packages/pdc/wsgi.py
ExpiresDefault "access plus 10 years"
</Location>
<Location "/extras">
SetHandler None
# Disable auth on the extras content, so that we're aren't forced to
# use Kerberos. Doing so would remove "Expires" headers from the extras
# content, which would lead to poor page-load times.
AuthType none
Satisfy Any
Require all granted
# Many file types are likely to benefit from compression
# Enable gzip compression on them:
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript application/x-javascript text/css
</Location>
<Location "/docs">
SetHandler None