diff options
author | Sven Gothel <[email protected]> | 2010-11-09 03:05:17 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-11-09 03:05:17 +0100 |
commit | b3e89bfa55389cae974c94afba6fb4ce118f75df (patch) | |
tree | 063f7d59cee39e3beeec7c17c74d10497d0fa8a5 /hudson-builds |
Provide deployment (jnlp) and hudson build aggregation scripts
Diffstat (limited to 'hudson-builds')
-rwxr-xr-x | hudson-builds/archive-jars-latest.sh | 158 | ||||
-rwxr-xr-x | hudson-builds/archive-verify-latest.sh | 99 |
2 files changed, 257 insertions, 0 deletions
diff --git a/hudson-builds/archive-jars-latest.sh b/hudson-builds/archive-jars-latest.sh new file mode 100755 index 0000000..651ae0b --- /dev/null +++ b/hudson-builds/archive-jars-latest.sh @@ -0,0 +1,158 @@ +#! /bin/bash + +archivedir=/srv/www/jogamp.org/deployment/archive +rootdir=/srv/www/jogamp.org/deployment/autobuilds + +os_and_archs_minus_one="linux-i586 macosx-universal windows-amd64 windows-i586" +masterpick="linux-amd64" +os_and_archs="$masterpick linux-i586 macosx-universal windows-amd64 windows-i586" + +thisdir=`pwd` +cd $rootdir + +dest=tmp-archive + +rm -rf $dest +mkdir $dest +mkdir $dest/javadoc + +function lslatest() { + pattern=$1 + shift + ls -rt | grep $pattern | tail -1 +} + +function buildnumber_2() { + folder=$1 + shift + echo $folder | awk -F '-' ' { print substr($2, 2); } ' +} + +function buildnumber_3() { + folder=$1 + shift + echo $folder | awk -F '-' ' { print substr($3, 2); } ' +} + +function buildnumber_4() { + folder=$1 + shift + echo $folder | awk -F '-' ' { print substr($4, 2); } ' +} + +gluegenslave=`lslatest gluegen-b` +bgluegenslave=`buildnumber_2 $gluegenslave` +gluegenmaster=`lslatest gluegen-master-b` +bgluegenmaster=`buildnumber_3 $gluegenmaster` +echo +echo GLUEGEN +echo +echo slave build $bgluegenslave - $gluegenslave +echo master build $bgluegenmaster - $gluegenmaster +echo +echo "gluegen.build.number=$bgluegenslave" >> $dest/aggregated.artifact.properties + +cp -a $gluegenslave/build/gluegen*jar $dest/ +cp -a $gluegenslave/build/artifact.properties $dest/gluegen.artifact.properties + +cp -a $gluegenmaster/build/artifact.properties $dest/javadoc/gluegen-master.artifact.properties +mkdir $dest/javadoc/gluegen +cp -a $gluegenmaster/build/javadoc.zip $dest/javadoc/gluegen +cd $dest/javadoc/gluegen +unzip -q javadoc.zip +cd $rootdir + +joglslave=`lslatest jogl-b` +bjoglslave=`buildnumber_2 $joglslave` +joglmaster=`lslatest jogl-master-b` +bjoglmaster=`buildnumber_3 $joglmaster` +echo +echo JOGL +echo +echo slave build $bjoglslave - $joglslave +echo master build $bjoglmaster - $joglmaster +echo +echo "jogl.build.number=$bjoglslave" >> $dest/aggregated.artifact.properties + +cp -a $joglslave/build/jogl*zip $dest/ +cd $dest +for i in *"$os_and_archs_minus_one".zip ; do + unzip -q $i +done +unzip -q *"$masterpick".zip +cd $rootdir +cp -a $joglslave/build/artifact.properties $dest/jogl.artifact.properties + +cp -a $joglmaster/build/artifact.properties $dest/javadoc/jogl-master.artifact.properties +mkdir $dest/javadoc/jogl +cp -a $joglmaster/build/javadoc*.zip $dest/javadoc/jogl +cd $dest/javadoc/jogl +for i in *.zip ; do + unzip -q $i +done +cd $rootdir + +jogldemosmaster=`lslatest jogl-demos-master-b` +bjogldemosmaster=`buildnumber_4 $jogldemosmaster` +echo +echo JOGL DEMOS +echo +echo master build $bjogldemosmaster - $jogldemosmaster +echo +echo "jogl-demos.build.number=$bjogldemosmaster" >> $dest/aggregated.artifact.properties + +cp -a $jogldemosmaster/build/jogl-demos*jar $dest/ +cp -a $jogldemosmaster/build/artifact.properties $dest/jogl-demos.artifact.properties +cd dest + + +joclslave=`lslatest jocl-b` +bjoclslave=`buildnumber_2 $joclslave` +joclmaster=`lslatest jocl-master-b` +bjoclmaster=`buildnumber_3 $joclmaster` +echo +echo JOCL +echo +echo slave build $bjoclslave - $joclslave +echo master build $bjoclmaster - $joclmaster +echo +echo "jocl.build.number=$bjoclslave" >> $dest/aggregated.artifact.properties + +cp -a $joclslave/jocl*jar $dest/ +cp -a $joclslave/artifact.properties $dest/jocl.artifact.properties + +cp -a $joclmaster/artifact.properties $dest/javadoc/jocl-master.artifact.properties +mkdir $dest/javadoc/jocl +cp -a $joclmaster/jocl-javadoc.zip $dest/javadoc/jocl/ +cd $dest/javadoc/jocl +unzip -q jocl-javadoc.zip +cd $rootdir + +jocldemosslave=`lslatest jocl-demos-b` +bjocldemosslave=`buildnumber_3 $jocldemosslave` +echo +echo JOCL DEMOS +echo +echo slave build $bjocldemosslave - $jocldemosslave +echo +echo "jocl-demos.build.number=$bjocldemosslave" >> $dest/aggregated.artifact.properties + +cp -a $jocldemosslave/jocl-demos*jar $dest/ +cp -a $jocldemosslave/artifact.properties $dest/jocl-demos.artifact.properties + +rm -rf $archivedir/gluegen_$bgluegenslave-jogl_$bjoglslave-jocl_$bjoclslave +mv $dest $archivedir/gluegen_$bgluegenslave-jogl_$bjoglslave-jocl_$bjoclslave + +echo +echo Aggregation folder $archivedir/gluegen_$bgluegenslave-jogl_$bjoglslave-jocl_$bjoclslave +echo + +cd $archivedir/gluegen_$bgluegenslave-jogl_$bjoglslave-jocl_$bjoclslave + +echo +echo aggregation.properties +echo +cat jocl-demos.artifact.properties jogl-demos.artifact.properties | sort -u > jocl-demos-jogl-demos.artifact.properties.sorted +sort -u aggregated.artifact.properties > aggregated.artifact.properties.sorted +diff -Nurb aggregated.artifact.properties.sorted jocl-demos-jogl-demos.artifact.properties.sorted + diff --git a/hudson-builds/archive-verify-latest.sh b/hudson-builds/archive-verify-latest.sh new file mode 100755 index 0000000..a149ca8 --- /dev/null +++ b/hudson-builds/archive-verify-latest.sh @@ -0,0 +1,99 @@ +#! /bin/bash + +if [ -z "$1" ] ; then + archive=/srv/www/jogamp.org/deployment/jogamp-next +else + archive=$1 +fi + +logfile=`basename $0 .sh`.log + +rm -rf zips +mkdir zips +cd zips +for i in $archive/*.zip ; do + bname=`basename $i .zip` + unzip -q $i + if [ -e $bname ] ; then + cd $bname + ls > ../$bname.lst + cd .. + else + echo "Error: No folder $bname in $i" + fi +done +cd .. + +rm -rf plain +mkdir plain +cd plain +cp -a $archive/*.jar . +ls > ../plain.lst +cd .. + +rm -rf dump +mkdir dump + +echo "Verifying all files in $archive" +ls -la $archive +echo + +function integrity_check() { + cd dump + for i in ../plain/*.jar ; do + bname=`basename $i` + echo -n "$bname integrity - " + OK=0 + jar xvf $i >& $i.log && OK=1 + if [ $OK -eq 0 ] ; then + echo ERROR + else + echo OK + rm $i.log + fi + done + echo + cd .. +} + +function identity_check() { + mkdir plain/natives + mv plain/*-natives-*jar plain/natives + mkdir plain/demos + mv plain/jogl-demos*jar plain/demos + + cd zips + + for i in ../plain/*.jar ; do + bname=`basename $i` + echo -n "$bname identity - " + OK=0 + for j in `find . -name $bname` ; do + if cmp -s $i $j ; then + OK=1 + echo -n "$j " + fi + done + if [ $OK -eq 0 ] ; then + echo "NONE" + echo "Error: verbose comparison of $bname" + for j in `find . -name $bname` ; do + cmp $i $j + done + else + echo + fi + done + echo + + cd .. + + mv plain/natives/* plain/ + rm -rf plain/natives + mv plain/demos/* plain/ + rm -rf plain/demos +} + +integrity_check 2>&1 | tee $logfile +identity_check 2>&1 | tee $logfile + |