move budget to its own role and sync scripts
This commit is contained in:
parent
05d462d30f
commit
9449f3e237
13 changed files with 51 additions and 30 deletions
|
@ -39,8 +39,6 @@
|
|||
website: labs.fedoraproject.org
|
||||
- role: fedora-web/arm
|
||||
website: arm.fedoraproject.org
|
||||
- role: fedora-web/budget
|
||||
website: budget.fedoraproject.org
|
||||
- role: fedora-web/registry
|
||||
website: registry.fedoraproject.org
|
||||
- role: fedora-web/candidate-registry
|
||||
|
@ -53,6 +51,9 @@
|
|||
website: src.fedoraproject.org
|
||||
|
||||
# Some other static content, not strictly part of "fedora-web" goes below here
|
||||
- role: fedora-budget/proxy
|
||||
website: budget.fedoraproject.org
|
||||
|
||||
- role: fedora-docs/proxy
|
||||
website: docs.fedoraproject.org
|
||||
|
||||
|
|
1
roles/fedora-budget/build/files/cron-budget-sync
Normal file
1
roles/fedora-budget/build/files/cron-budget-sync
Normal file
|
@ -0,0 +1 @@
|
|||
5 * * * * root /usr/local/bin/lock-wrapper budget-sync "/usr/local/bin/budget-sync | /usr/local/bin/nag-once budget-sync 1d 2>&1"
|
1
roles/fedora-budget/build/files/cron-budget-sync.stg
Normal file
1
roles/fedora-budget/build/files/cron-budget-sync.stg
Normal file
|
@ -0,0 +1 @@
|
|||
*/5 * * * * root /usr/local/bin/lock-wrapper budget-sync "/usr/local/bin/budget-sync | /usr/local/bin/nag-once budget-sync 1d 2>&1"
|
24
roles/fedora-budget/build/tasks/main.yml
Normal file
24
roles/fedora-budget/build/tasks/main.yml
Normal file
|
@ -0,0 +1,24 @@
|
|||
- file: dest=/srv/web/budget.fedoraproject.org state=directory
|
||||
|
||||
- template: >
|
||||
src=budget-sync.j2 dest=/usr/local/bin/budget-sync
|
||||
owner=root group=root mode=0755
|
||||
tags:
|
||||
- fedora-budget
|
||||
- fedora-budget/build
|
||||
|
||||
- copy: >
|
||||
src=cron-budget-sync dest=/etc/cron.d/budget-sync
|
||||
owner=root group=root mode=0644
|
||||
tags:
|
||||
- fedora-budget
|
||||
- fedora-budget/build
|
||||
when: env == "production"
|
||||
|
||||
- copy: >
|
||||
src=cron-budget-sync.stg dest=/etc/cron.d/budget-sync
|
||||
owner=root group=root mode=0644
|
||||
tags:
|
||||
- fedora-budget
|
||||
- fedora-budget/build
|
||||
when: env == "staging"
|
22
roles/fedora-budget/build/templates/budget-sync.j2
Executable file
22
roles/fedora-budget/build/templates/budget-sync.j2
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ ! -d /srv/web/budget.fedoraproject.org ]
|
||||
then
|
||||
echo "/srv/web/budget.fedoraproject.org missing"
|
||||
cd /srv/web
|
||||
{% if env == 'staging' %}
|
||||
git clone -b stg https://pagure.io/fedora-budget-site.git budget.fedoraproject.org
|
||||
{% else %}
|
||||
git clone https://pagure.io/fedora-budget-site.git budget.fedoraproject.org
|
||||
{% endif %}
|
||||
fi
|
||||
|
||||
|
||||
cd /srv/web/budget
|
||||
/usr/bin/git reset -q --hard
|
||||
{% if env == 'staging' %}
|
||||
/usr/bin/git checkout -q stg
|
||||
{% else %}
|
||||
/usr/bin/git checkout -q prod
|
||||
{% endif %}
|
||||
/usr/bin/git pull -q --ff-only
|
|
@ -71,16 +71,3 @@ build fedoracommunity.org
|
|||
build fudcon.fedoraproject.org
|
||||
build start.fedoraproject.org
|
||||
build fedoraproject.org
|
||||
|
||||
if [ ! -d /srv/web/budget.fedoraproject.org/.git ]
|
||||
then
|
||||
/usr/bin/git clone -q \
|
||||
https://pagure.io/fedora-budget-site.git \
|
||||
/srv/web/budget.fedoraproject.org
|
||||
fi
|
||||
|
||||
cd /srv/web/budget.fedoraproject.org
|
||||
/usr/bin/git clean -q -fdx || exit 1
|
||||
/usr/bin/git reset -q --hard || exit 1
|
||||
/usr/bin/git checkout -q prod || exit 1
|
||||
/usr/bin/git pull -q --ff-only || exit 1
|
||||
|
|
|
@ -69,16 +69,3 @@ build fedoracommunity.org
|
|||
build fudcon.fedoraproject.org
|
||||
build start.fedoraproject.org
|
||||
build flocktofedora.org
|
||||
|
||||
if [ ! -d /srv/web/budget.fedoraproject.org/.git ]
|
||||
then
|
||||
/usr/bin/git clone -q \
|
||||
https://pagure.io/fedora-budget-site.git \
|
||||
/srv/web/budget.fedoraproject.org
|
||||
fi
|
||||
|
||||
cd /srv/web/budget.fedoraproject.org
|
||||
/usr/bin/git clean -q -fdx || exit 1
|
||||
/usr/bin/git reset -q --hard || exit 1
|
||||
/usr/bin/git checkout -q stg || exit 1
|
||||
/usr/bin/git pull -q --ff-only || exit 1
|
||||
|
|
|
@ -12,7 +12,6 @@ SITES="alt.fedoraproject.org \
|
|||
flocktofedora.org \
|
||||
spins.fedoraproject.org \
|
||||
labs.fedoraproject.org \
|
||||
budget.fedoraproject.org \
|
||||
arm.fedoraproject.org \
|
||||
start.fedoraproject.org"
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@ SITES="alt.fedoraproject.org \
|
|||
flocktofedora.org \
|
||||
spins.fedoraproject.org \
|
||||
labs.fedoraproject.org \
|
||||
budget.fedoraproject.org \
|
||||
arm.fedoraproject.org \
|
||||
start.fedoraproject.org"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue