websites: clean old build configuration on sundries

This commit is contained in:
Francois Andrieu 2022-06-21 20:45:38 +02:00 committed by kevin
parent 771d72e12d
commit 68d61b87c5
5 changed files with 14 additions and 171 deletions

View file

@ -1,2 +0,0 @@
MAILTO=web-members@fedoraproject.org
0 * * * * apache /usr/local/bin/lock-wrapper syncStatic /usr/local/bin/syncStatic

View file

@ -1,65 +0,0 @@
#!/bin/bash
# mmcgrath@redhat.com 09-20-2007
#
function build {
site="$1"
err=$(
{
cd "$site" && \
make pullpos && \
make && \
rsync -qa --delete-after --delay-updates out/ "/srv/web/$site/"; \
} 2>&1
)
rc=$?
if [ $rc -ne 0 ]; then
echo "$site build failed"
echo "===================================="
echo "$err"
echo
fi
return $rc;
}
if [ ! -d /srv/web/fedora-websites/.git ]
then
/usr/bin/git clone -q \
https://pagure.io/fedora-websites.git \
/srv/web/fedora-websites
fi
# Freeze the website to prepare beta changes. On release day, comment the git
# checkout line below, run this script, and use:
# sudo func proxy\* call command run "/usr/bin/rsync -a --no-owner --no-group sundries01::fedoraproject.org/* /srv/web/fedoraproject.org/"
# on puppet1 to update the website.
#
# For any other last-minute changes or fixes, make the necessary changes in the
# fedora-web repo, then run this script and the above func command.
#
# Good luck!
cd /srv/web/fedora-websites
/usr/bin/git clean -q -fdx || exit 1
/usr/bin/git reset -q --hard || exit 1
/usr/bin/git checkout -q main || exit 1
/usr/bin/git pull -q --ff-only || exit 1
build labs.fedoraproject.org
build arm.fedoraproject.org
build alt.fedoraproject.org
# Make sure everything else builds from main.
/usr/bin/git clean -q -fdx || exit 1
/usr/bin/git reset -q --hard || exit 1
/usr/bin/git checkout -q main || exit 1
/usr/bin/git pull -q --ff-only || exit 1
build flocktofedora.org
build spins.fedoraproject.org
build fedoracommunity.org
build start.fedoraproject.org

View file

@ -1,65 +0,0 @@
#!/bin/bash
# mmcgrath@redhat.com 09-20-2007
#
function build {
site="$1"
err=$(
{
cd "$site" && \
make pullpos && \
make && \
rsync -qa --delete-after --delay-updates out/ "/srv/web/$site/"; \
} 2>&1
)
rc=$?
if [ $rc -ne 0 ]; then
echo "$site build failed"
echo "===================================="
echo "$err"
echo
fi
return $rc;
}
if [ ! -d /srv/web/fedora-websites/.git ]
then
/usr/bin/git clone -q \
https://pagure.io/fedora-websites.git \
/srv/web/fedora-websites
fi
# Freeze the website to prepare beta changes. On release day, comment the git
# checkout line below, run this script, and use:
# sudo func proxy\* call command run "/usr/bin/rsync -a --no-owner --no-group sundries01::fedoraproject.org/* /srv/web/fedoraproject.org/"
# on puppet1 to update the website.
#
# For any other last-minute changes or fixes, make the necessary changes in the
# fedora-web repo, then run this script and the above func command.
#
# Good luck!
cd /srv/web/fedora-websites
/usr/bin/git clean -q -fdx || exit 1
/usr/bin/git reset -q --hard || exit 1
/usr/bin/git checkout -q staging || exit 1
/usr/bin/git pull -q --ff-only || exit 1
build labs.fedoraproject.org
build spins.fedoraproject.org
build arm.fedoraproject.org
build alt.fedoraproject.org
# Make sure everything else builds from main.
/usr/bin/git clean -q -fdx || exit 1
/usr/bin/git reset -q --hard || exit 1
/usr/bin/git checkout -q main || exit 1
/usr/bin/git pull -q --ff-only || exit 1
build flocktofedora.org
build fedoracommunity.org
build start.fedoraproject.org

View file

@ -35,15 +35,9 @@
with_items:
- fedora-web
- fedoraproject.org
- spins.fedoraproject.org
- talk.fedoraproject.org
- start.fedoraproject.org
- mirrors.fedoraproject.org
- fedoracommunity.org
- flocktofedora.org
- arm.fedoraproject.org
- iot.fedoraproject.org
- labs.fedoraproject.org
tags:
- fedora-web
@ -59,35 +53,16 @@
- fedora-web
when: env == 'staging'
- name: Copy syncStatic script (stg)
when: env == "staging"
copy: >
src=syncStatic.stg.sh dest=/usr/local/bin/syncStatic owner=root group=root
mode=0755
tags:
- fedora-web
- name: Copy syncStatic script (prod)
when: env == "production"
copy: >
src=syncStatic.sh dest=/usr/local/bin/syncStatic owner=root group=root
mode=0755
tags:
- fedora-web
- name: Install the syncStatic and syncTranslations cronjobs
copy: >
src={{item}}.cron dest=/etc/cron.d/{{item}}.cron
owner=root group=root mode=0644
with_items:
- syncStatic
tags:
- fedora-web
- cron
- name: Remove the syncTranslations cronjob
file:
path: /etc/cron.d/syncTranslations.cron
state: absent
tags:
- cron
- name: Remove the syncStatic cronjob
file:
path: /etc/cron.d/syncStatic.cron
state: absent
tags:
- cron

View file

@ -64,7 +64,7 @@ hosts allow = 10.3.160.0/255.255.224.0 192.168.0.0/255.255.0.0
[spins.fedoraproject.org]
comment = spins.fedoraproject.org
path = /srv/web/spins.fedoraproject.org
path = /srv/websites/spins.fedoraproject.org
uid = root
gid = root
read only = yes
@ -80,7 +80,7 @@ hosts allow = 10.3.160.0/255.255.224.0 192.168.0.0/255.255.0.0
[start.fedoraproject.org]
comment = start.fedoraproject.org
path = /srv/web/start.fedoraproject.org
path = /srv/websites/start.fedoraproject.org
uid = root
gid = root
read only = yes
@ -96,7 +96,7 @@ hosts allow = 10.3.160.0/255.255.224.0 192.168.0.0/255.255.0.0
[fedoracommunity.org]
comment = fedoracommunity.org
path = /srv/web/fedoracommunity.org
path = /srv/websites/fedoracommunity.org
uid = root
gid = root
read only = yes
@ -104,7 +104,7 @@ hosts allow = 10.3.160.0/255.255.224.0 192.168.0.0/255.255.0.0
[flocktofedora.org]
comment = flocktofedora.org
path = /srv/web/flocktofedora.org
path = /srv/websites/flocktofedora.org
uid = root
gid = root
read only = yes
@ -120,7 +120,7 @@ hosts allow = 10.3.160.0/255.255.224.0 192.168.0.0/255.255.0.0
[labs.fedoraproject.org]
comment = labs.fedoraproject.org
path = /srv/web/labs.fedoraproject.org
path = /srv/websites/labs.fedoraproject.org
uid = root
gid = root
read only = yes
@ -136,7 +136,7 @@ hosts allow = 10.3.160.0/255.255.224.0 192.168.0.0/255.255.0.0
[arm.fedoraproject.org]
comment = arm.fedoraproject.org
path = /srv/web/arm.fedoraproject.org
path = /srv/websites/arm.fedoraproject.org
uid = root
gid = root
read only = yes
@ -168,7 +168,7 @@ hosts allow = 10.3.160.0/255.255.224.0 192.168.0.0/255.255.0.0
[alt.fedoraproject.org]
comment = alt.fedoraproject.org
path = /srv/web/alt.fedoraproject.org
path = /srv/websites/alt.fedoraproject.org
uid = root
gid = root
read only = yes