Difference between revisions of "Koji Testbed"

From PDP/Grid Wiki
Jump to navigationJump to search
(remove the nightly builds section)
Line 464: Line 464:
 
= Nightly builds from mwsec/trunk =
 
= Nightly builds from mwsec/trunk =
  
The dedicated account kojinb for nightly builds is added on bleek.
+
We no longer run nightly builds. That should move to a continuous integration system.
 
 
At the moment nightly builds are run from a crontab of account dennisvd.
 
01 2 * * * ${HOME}/bin/koji-nightly
 
 
 
The koji-nightly script:
 
#!/bin/sh
 
 
PATH=/bin:/usr/bin
 
 
components="
 
lcas
 
lcmaps
 
ees
 
glexec
 
jobrepository
 
lcas-lcmaps-gt4-interface
 
lcas-plugins-basic
 
lcas-plugins-check-executable
 
lcas-plugins-voms
 
lcmaps-plugins-afs
 
lcmaps-plugins-basic
 
lcmaps-plugins-c-pep
 
lcmaps-plugins-gums
 
lcmaps-plugins-jobrep
 
lcmaps-plugins-scas-client
 
lcmaps-plugins-tracking-groupid
 
lcmaps-plugins-verify-proxy
 
lcmaps-plugins-voms
 
scas
 
"
 
 
dists="epel5 epel6 fc16 fc17"
 
 
rev=`svn info http://ndpfsvn.nikhef.nl/ro/mwsec/ | sed -n 's/^Revision: //p'`
 
 
for i in $components ; do
 
    for j in $dists ; do
 
koji -c ${HOME}/.koji/nightly.conf build --nowait nightly-$j \
 
            svn+http://ndpfsvn.nikhef.nl/ro/mwsec\?packaging/fedora/branches/nightly-builds/$i/#$rev
 
    done
 
done
 
 
 
Each component directory in the nightly-builds branch contains the same set of files: a Makefile:
 
component = $(notdir $(shell pwd))
 
 
sources:
 
./fetch-sources $(component)
 
 
 
And a fetch-sources script:
 
#!/bin/sh
 
 
set -e
 
 
component=$1
 
 
svn co http://ndpfsvn.nikhef.nl/ro/mwsec/trunk/${component}
 
cd ${component}
 
revision=`svn info | sed -n 's/^Last Changed Rev: //p'`
 
 
if [ -z $revision ]; then
 
    echo "Could not retrieve revision from svn info" >&2
 
    echo "svn info:" >&2
 
    svn info >&2
 
    exit 1
 
fi
 
 
./bootstrap
 
mkdir build
 
cd build
 
../configure
 
make dist
 
mv ${component}-*.tar.gz ..
 
cd ..
 
 
version=`echo ${component}-*.tar.gz | sed -n "s/${component}-\\([0-9.]*\\)\\.tar\\.gz/\\1/p"`
 
 
if [ -z $version ]; then
 
    echo "Could not retrieve version from generated tarball" >&2
 
    echo "tarballs: " ${component}-*.tar.gz >&2
 
    exit 1
 
fi
 
 
sed -i -e "s/^Version: .*/Version: $version/" -e "s/^Release: .*/Release: 0.$revision%{?dist}/" ${component}.spec
 
 
 
The list of components misses just two packages: argus-pep-api-c, which is not under our active development, and xacml, which has some problems at this moment; gsoap-devel needs to be added to the build-srpm group (done) and as the nightly build does the bootstrapping as well, the autoconf for the epel5 tag is too old according to configure.in. Whether this is really the case remains to be seen.
 
 
 
== Preventing repeat builds ==
 
 
 
Koji will refuse build artefacts that it already has. The nightly builds are versioned according to the svn revision of the latest update of the tree to build. That means that if no updates are done to the tree, there is no sense in repeating the build. The cron script should be enhanced to deal with this situation.
 
  
 
= Troubleshooting =
 
= Troubleshooting =

Revision as of 10:26, 1 August 2013