Ticket #347 (closed task: fixed)

Opened 4 years ago

Last modified 4 years ago

PostGIS SVN post-commit hooks

Reported by: pramsey Owned by: sac@…
Priority: normal Milestone:
Component: Systems Admin Keywords: svn
Cc: mloskot, kneufeld

Description

The old repository has the following hooks that need to be added:

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

/home/svn/bin/commit-email.pl -s "svn -" -h postgis.refractions.net "$REPOS" "$REV"  postgis-commits@postgis.refractions.net
/home/svn/bin/ciabot_postgis.py "$REPOS" "$REV" "postgis" &

if svnlook dirs-changed /home/svn/repositories/postgis | grep trunk >/dev/null 2>&1; then
	/usr/bin/wget -O - -q -b http://postgis.refractions.net:8082/job/PostGIS-trunk/build?token=build_it
fi
if svnlook dirs-changed /home/svn/repositories/postgis | grep branches >/dev/null 2>&1; then
        /usr/bin/wget -O - -q -b http://postgis.refractions.net:8082/job/PostGIS-branch/build?token=build_it
fi

Change History

Changed 4 years ago by mloskot

Paul,

I'm not sure but perhaps it's helpful to admins to show content of /home/svn/bin/ciabot_postgis.py file.

Changed 4 years ago by pramsey

Here's the relevant parts (it's a standard script)

    project = "postgis"

    pathRegex = r"""
      ^(                                       # Start at beginning of path
        ( (?P<module>[^/]+) /trunk ) |
        ( (?P<bmodule>[^/]+) /(branches|tags)/ (?P<branch>[^/]+) )
       )/?                                     # Slurp up trailing slash
      """

Changed 4 years ago by hobu

generic CIA hook added and email hook added

/var/www/svn/hookscripts/commit-email.pl "$REPOS" "$REV" --from svn_postgis@osgeo.o
rg postgis-commits@lists.osgeo.org &
/var/www/svn/hookscripts/ciabot_svn.py "$REPOS" "$REV" "postgis" &

I have not implemented the wget that tickles the builder on postgis.refractions.net, as I do not know if this is still to be used.

The postgis-commits email list needs to be created to complete this task.

Changed 4 years ago by mloskot

  • cc mloskot added
  • keywords svn added

Changed 4 years ago by tmitchell

  • owner changed from tmitchell to sac@…
  • component changed from General to SAC

Assigning to SAC

Changed 4 years ago by pramsey

  • cc kneufeld added

Kevin Neufeld writes:

Now that we are fully moved over to the osgeo SVN and I've had a chance to rebuild our autobuild environment, I need a couple of SVN hooks installed.

When the svn was hosted here, I installed a couple of post-commit hooks that automatically triggered several test builds/regression tests/pdf generatation/etc... after every commit.

I can I please get someone to install something similiar on the new svn.osgeo.org/postgis repo?

i.e., something like this in post-commit:
if svnlook dirs-changed /home/svn/repositories/postgis | grep trunk >/dev/null 2>&1; then
       /usr/bin/wget -O - -q -b http://office.refractions.net:8082/job/PostGIS-trunk-build/build?token=build_it
fi
if svnlook dirs-changed /home/svn/repositories/postgis | grep branches >/dev/null 2>&1; then
       /usr/bin/wget -O - -q -b http://office.refractions.net:8082/job/PostGIS-branch-build/build?token=build_it
fi
if svnlook dirs-changed /home/svn/repositories/postgis | grep branches >/dev/null 2>&1; then
       /usr/bin/wget -O - -q -b http://office.refractions.net:8082/job/WKTRaster-trunk-build/build?token=build_it
fi

(this will trigger independent builds for the PostGIS branch and trunk as well as the WKTRaster project).

At the moment, the reference buildfarm is polling the branch and trunk directories for changes ... I'd think it'd be better to move this to a push operation.

Changed 4 years ago by kneufeld

  • status changed from new to closed
  • resolution set to fixed

We have working hooks for the postgis branch, trunk, and raster directories that trigger autobuilds for each, currently located here:  http://office.refractions.net:1500/

The buildbot tests the triggered build, generates docbook html and pdf docs, and performs regression testing against 8.2, 8.3, and 8.4 (though there is still some regression testing for wktraster that could be done). At least now the website docs and tarball snapshots are up to date.

It's agreed this buildbot is not the best solution since the box is not available to all developers. If anyone wants to setup other bots that test in other environments, please feel free.

-- Kevin

Note: See TracTickets for help on using tickets.