Daily snapshots

From WikiOAR

Revision as of 14:46, 8 December 2009 by Bzizou (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Debian unstable OAR packages are automatically made once a day from the git/svn trunk. They are called snapshots packages. No snapshot is made if no commits happened during the day and no new snapshot is made if the building process is broken. For simplicity, the unstable repository is not signed. I sometimes can create manually snapshots during the day (or the night...) --Bzizou 15:13, 27 November 2009 (UTC)

Current snapshots are in the 2.4 unstable repository:

deb http://oar.imag.fr/debian/2.4 unstable main

The creation process is: "cron" -> "git svn rebase" -> "git-buildpackage" -> "scp to oar.imag.fr" -> "dpkg-scanpackages"

Here is the snapshot.sh script that runs on "oarteam@wiki-oar":

#!/bin/bash
set -e 

# Locking
LOCK=/var/lock/`basename $0`
lockfile-create $LOCK || exit 2
lockfile-touch $LOCK &
BADGER="$!"
function remove_lock {
  kill "${BADGER}" 2>/dev/null || true
  lockfile-remove $LOCK
}

# Exit trap function
function exit_on_error {
  echo "Exiting on error..."
  remove_lock
  exit 1
}

# Exit normaly
function exit_on_end {
  echo "Exiting..."
  remove_lock
  exit 0
}

trap exit_on_error ERR
trap exit_on_end QUIT TERM EXIT

export EMAIL="Bruno Bzeznik <Bruno.Bzeznik@imag.fr>"
export DEBEMAIL="Bruno Bzeznik <Bruno.Bzeznik@imag.fr>" 

cd ~oarteam/git/oar/git
output=`git svn rebase 2>&1|grep "is up to date"` || true
if [ "$output" = "" -o "$1" = "-f" ]
then
  cd ..
  rm -rf ./build-area/*
  ./git-build-package.sh -u -s deb trunk-work
   ssh bzeznik@navajo
fi

and on bzeznik@navajo, the key of wiki-oar is reconized to exclusively execute a script that asks oar.imag.fr to scp files and update repository.

The git-build-package.sh script is found under the Misc/pkg_building directory of any branch (starting from 2.3). It is linked into the parent directory (~/git/oar) of my git repository (~git/oar/git)

starting a snapshot manually

  • conditional snapshot (only if there's a new commit)
ssh oarteam@wiki-oar git/oar/snapshot.sh
  • forced snapshot (just for testing)
ssh oarteam@wiki-oar git/oar/snapshot.sh -f
Personal tools