Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#453 closed task (fixed)

Migrate SVN hooks

Reported by: lferran Owned by: lferran
Priority: major Milestone: IT: Server Migration
Component: IT Version:
Keywords: Cc:
Referenced By: References:

Description

When migrating the SVN service, all hooks must be migrated too! Subtasks:

  1. Identify which hooks are there for each repository: scripts, compilations, emails…
  1. Can they be migrated to the new server?
  1. Test them in the new server.
  1. Migrate them.

Change History (5)

comment:1 Changed 8 years ago by landauf

This is related to #439

Last edited 8 years ago by landauf (previous) (diff)

comment:2 Changed 8 years ago by lferran

Repositories with post-commit hook:

  • biomed: email
  • data: email + svn backup
  • datavis: email + svn backup
  • downloads: email
  • game: email + svn backup + doxygen if it was a trunk commit
  • netflow: no hooks
  • ogre: email
  • orxonox: email + svn backup + doxygen if it was a trunk commit
  • orxonox_closed: email + svn backup
  • subprojects: email
  • vseth_projects: email
  • webdev: email + svn backup + svn update

biomed

Only a post-commit hook sending an email to the mailing list.

REPOS="$1"
REV="$2"

/var/svn/scripts/commit-email.pl "$REPOS" "$REV" biomed@orxonox.ethz.ch

data

Post-commit only: send email to mailing list and

REPOS="$1"
REV="$2"

# Send commit email to mailing list
/var/svn/scripts/commit-email.pl "$REPOS" "$REV" orxonox-commit@orxonox.net -s data

# Backup repository script
/var/svn/scripts/svnbackup --rep data dump all

# What are we doing here?
cd /var/www/orxonox/files/data; sudo -u orxonox /usr/bin/svn up

game

The game repository only has a post-commit hook.

REPOS="$1"
REV="$2"

# Send email to the mailing list
#/var/svn/scripts/commit-email.pl "$REPOS" "$REV" orxonox-commit@mail.datacore.ch
/var/svn/scripts/commit-email.pl "$REPOS" "$REV" orxonox-commit@orxonox.net

##log-commit.py --repository "$REPOS" --revision "$REV"

# Do a backup of the repositories
/var/svn/scripts/svnbackup --rep orxonox dump all


# Why svn up here? 
cd /var/www/www.orxonox.net/trunk; sudo -u orxonox /usr/bin/svn up

## now update doxygen if this was a trunk-commit
if [[ `echo $REPOS | grep trunk` ]]; then
        sudo /etc/cron.daily/doxygen_orx
fi;
Last edited 8 years ago by lferran (previous) (diff)

comment:3 Changed 8 years ago by lferran

We decided that:

  • Only the email-commit should be migrated

wrt the rest of hooks:

  • Doxygen updates are not needed anymore: they are done through Jenkins
  • Svn updates are not needed anymore: Jenkins
  • Special svn backups are not needed anymore: we accept 24hour loss (since there's a full backup every night), + emails can be seen as a distributed backup.

comment:4 Changed 8 years ago by lferran

Migrate commit-email script

This is an example of post-commit script. Instead of lferran@…, the corresponding mailing list address should be put.

REPOS="$1"
REV="$2"
TXN_NAME="$3"

REPONAME=`echo ${REPOS:15}`

/usr/share/subversion/hook-scripts/commit-email.pl "$REPOS" "$REV" lferran@orxonox.info -s "$REPONAME \
revision" --from admin@orxonox.info
Version 0, edited 8 years ago by lferran (next)

comment:5 Changed 8 years ago by lferran

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.