diff options
author | Sven Gothel <[email protected]> | 2011-09-14 04:26:39 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-09-14 04:26:39 +0200 |
commit | 34d922f3a207bae39699c48568df5e6f3d7da207 (patch) | |
tree | f65c1283dcc051c96227e0f643b1e51c281f01b1 /jenkins-builds | |
parent | 4f50f9a676e4bb2ff6aba0bd1b5ba6d8a84cac4f (diff) |
New FHS - Use versionless 7z archive files; Create merged platfrom jogamp 7z archive; copy applet-launcher.jar and junit.jar to jar folder
Diffstat (limited to 'jenkins-builds')
-rwxr-xr-x | jenkins-builds/funcs_promotion.sh | 83 | ||||
-rwxr-xr-x | jenkins-builds/promote-latest-builds.sh | 39 |
2 files changed, 91 insertions, 31 deletions
diff --git a/jenkins-builds/funcs_promotion.sh b/jenkins-builds/funcs_promotion.sh index 3e8f810..a86f9a4 100755 --- a/jenkins-builds/funcs_promotion.sh +++ b/jenkins-builds/funcs_promotion.sh @@ -14,8 +14,8 @@ function prom_setup() { mkdir $ldest mkdir $ldest/archive for i in $os_and_archs ; do - mkdir $ldest/archive/$i - mkdir $ldest/archive/$i/test-results/ + mkdir $ldest/archive/jogamp-$i + mkdir $ldest/archive/jogamp-$i/test-results/ done mkdir $ldest/jar mkdir $ldest/jar/atomic @@ -66,6 +66,54 @@ function prom_verify_artifacts() { fi } +function prom_merge_modules() { + local destdir=$1 + shift + local modules=$* + + local lthisdir=`pwd` + + echo "INFO: Mergin modules <$modules>" + cd $destdir + + for i in $os_and_archs ; do + local mergefolder=jogamp-$i + cd tmp + mkdir $mergefolder + for j in $modules ; do + local modulefolder=`find . -name $j\*$i` + if [ -z "$modulefolder" ] ; then + echo "ERROR: No module/platform extracted folder module $j, platform $i" + exit 1 + fi + cd $modulefolder + for k in artifact.properties LICENSE.txt README.txt ; do + if [ -e $k ] ; then + mv -v $k ../$mergefolder/$j.$k + fi + done + for k in \*-java-src.zip ; do + if [ -e $k ] ; then + mv -v $k ../$mergefolder/ + fi + done + for k in etc jar jnlp-files lib ; do + if [ -e $k ] ; then + mkdir -p ../$mergefolder/$k + mv -v $k/* ../$mergefolder/$k/ + fi + done + cd .. + done + cp -av ../log/aggregated.artifact.properties.sorted ../log/all.artifact.properties.sorted $mergefolder/ + echo "INFO: Create merged jogamp archive $mergefolder.7z" + 7z a -r ../archive/$mergefolder.7z $mergefolder + cd .. + done + + cd $lthisdir +} + # # #1 module name, IE gluegen, jogl, jocl or joal # #2 source folder of artifacts @@ -76,7 +124,7 @@ function prom_verify_artifacts() { # promote_files gluegen /builds/gluegen-b33 tmp-archive gluegen # promote_files jogl /builds/jogl-b211 tmp-archive nativewindow jogl newt # -function prom_promote_files() { +function prom_promote_module() { local module=$1 shift local sourcedir=$1 @@ -93,24 +141,28 @@ function prom_promote_files() { cd $destdir # unpack the platform 7z files for i in $os_and_archs ; do - cp -a $lthisdir/$sourcedir/$module*$i.7z archive/$i/ - cp -a $lthisdir/$sourcedir/$module*$i-test-results-*.7z archive/$i/test-results/ - local zfile=`find archive/$i -name $module\*$i.7z` - if [ -z "$zfile" ] ; then + local sfile=`find $lthisdir/$sourcedir -name $module\*$i.7z` + if [ -z "$sfile" ] ; then echo "ERROR: No platform 7z file for module $module, platform $i, sdir $sourcedir" exit 1 fi + local zfile=archive/jogamp-$i/$module-$i.7z + + cp -a $sfile $zfile + cp -a $lthisdir/$sourcedir/$module*$i-test-results-*.7z archive/jogamp-$i/test-results/ + local sfolder=`basename $sfile .7z` local zfolder=`basename $zfile .7z` echo "INFO: extract $module $i - $zfile -> tmp/$zfolder" cd tmp - prom_extract ../$zfile $zfolder + prom_extract ../$zfile $sfolder + mv -v $sfolder $zfolder cd .. prom_verify_artifacts $module log/$module.artifact.properties tmp/$zfolder/artifact.properties done # copy the platform JAR files from each platform 7z folder for i in $os_and_archs_minus_one ; do # 7z folder verfified above already - local zfile=`find archive/$i -name $module\*$i.7z` + local zfile=archive/jogamp-$i/$module-$i.7z local zfolder=tmp/`basename $zfile .7z` for sub in $submodules ; do local jars=`find $zfolder/jar -maxdepth 1 -name $sub\*$i.jar` @@ -135,7 +187,7 @@ function prom_promote_files() { done # copy the master pic JAR files # 7z folder verfified above already - local zfile=`find archive/$masterpick -name $module\*$masterpick.7z` + local zfile=archive/jogamp-$masterpick/$module-$masterpick.7z local zfolder=tmp/`basename $zfile .7z` for sub in $submodules ; do local jars=`find $zfolder/jar -maxdepth 1 -name $sub\*$masterpick.jar` @@ -193,19 +245,18 @@ function prom_promote_demos() { cd $destdir # unpack the 7z files local sfile=`find $lthisdir/$sourcedir -name $module\*$masterpick.7z` - local zfile=archive/`basename $sfile -$masterpick.7z`.7z - cp -av $sfile $zfile - if [ -x "$sfile" -o -z "$zfile" ] ; then + local zfile=archive/$module.7z + if [ -z "$sfile" ] ; then echo "ERROR: No 7z file for module $module, sdir $sourcedir" exit 1 fi cp -av $sfile $zfile - local zfolder0=`basename $sfile .7z` + local sfolder=`basename $sfile .7z` local zfolder=`basename $zfile .7z` echo "INFO: extract $module - $zfile -> tmp/$zfolder" cd tmp - prom_extract ../$zfile $zfolder0 - mv $zfolder0 $zfolder + prom_extract ../$zfile $sfolder + mv -v $sfolder $zfolder cd .. if $fromslave ; then prom_verify_artifacts $module log/$module.artifact.properties tmp/$zfolder/artifact.properties diff --git a/jenkins-builds/promote-latest-builds.sh b/jenkins-builds/promote-latest-builds.sh index e004434..b94db61 100755 --- a/jenkins-builds/promote-latest-builds.sh +++ b/jenkins-builds/promote-latest-builds.sh @@ -66,7 +66,7 @@ function promote-latest-builds() { echo echo "gluegen.build.number=$bgluegenslave" >> $dest/log/aggregated.artifact.properties - prom_promote_files gluegen $gluegenslave $dest gluegen + prom_promote_module gluegen $gluegenslave $dest gluegen cp -a $gluegenmaster/artifact.properties $dest/log/gluegen-master.artifact.properties cp -a $gluegenmaster/javadoc.7z $dest/archive/gluegen-javadoc.7z @@ -87,7 +87,7 @@ function promote-latest-builds() { echo echo "joal.build.number=$bjoalslave" >> $dest/log/aggregated.artifact.properties - prom_promote_files joal $joalslave $dest joal + prom_promote_module joal $joalslave $dest joal cp -a $joalmaster/artifact.properties $dest/log/joal-master.artifact.properties cp -a $joalmaster/javadoc.7z $dest/archive/joal-javadoc.7z @@ -122,8 +122,8 @@ function promote-latest-builds() { echo echo "jogl.build.number=$bjoglslave" >> $dest/log/aggregated.artifact.properties - # prom_promote_files jogl $joglslave $dest nativewindow jogl newt - prom_promote_files jogl $joglslave $dest jogl + # prom_promote_module jogl $joglslave $dest nativewindow jogl newt + prom_promote_module jogl $joglslave $dest jogl cp -a $joglmaster/artifact.properties $dest/log/jogl-master.artifact.properties cp -a $joglmaster/javadoc.7z $dest/archive/jogl-javadoc.7z @@ -162,7 +162,7 @@ function promote-latest-builds() { echo echo "jocl.build.number=$bjoclslave" >> $dest/log/aggregated.artifact.properties - prom_promote_files jocl $joclslave $dest jocl + prom_promote_module jocl $joclslave $dest jocl cp -a $joclmaster/artifact.properties $dest/log/jocl-master.artifact.properties cp -a $joclmaster/jocl-javadoc.7z $dest/archive/jocl-javadoc.7z @@ -193,16 +193,7 @@ function promote-latest-builds() { prom_integrity_check $dest jogl-demos/jar tmp/dump prom_integrity_check $dest jocl-demos/jar tmp/dump - prom_cleanup $dest - - uri=gluegen_$bgluegenslave-joal_$bjoalslave-jogl_$bjoglslave-jocl_$bjoclslave - url=http://jogamp.org/deployment/archive/$branch/gluegen_$bgluegenslave-joal_$bjoalslave-jogl_$bjoglslave-jocl_$bjoclslave - wsdir=$archivedir/gluegen_$bgluegenslave-joal_$bjoalslave-jogl_$bjoglslave-jocl_$bjoclslave - - rm -rf $wsdir - mv $dest $wsdir - - cd $wsdir + cd $dest echo echo aggregation.properties @@ -228,6 +219,21 @@ function promote-latest-builds() { diff -Nurbw log/aggregated.artifact.properties.sorted log/all.artifact.properties.sorted | tee log/all.artifact.properties.diff + cd $rootdir + + prom_merge_modules $dest gluegen joal jogl jocl + + prom_cleanup $dest + + uri=gluegen_$bgluegenslave-joal_$bjoalslave-jogl_$bjoglslave-jocl_$bjoclslave + url=http://jogamp.org/deployment/archive/$branch/gluegen_$bgluegenslave-joal_$bjoalslave-jogl_$bjoglslave-jocl_$bjoclslave + wsdir=$archivedir/gluegen_$bgluegenslave-joal_$bjoalslave-jogl_$bjoglslave-jocl_$bjoclslave + + rm -rf $wsdir + mv $dest $wsdir + + cd $wsdir + copy_relocate_jnlps_base $version $url $wsdir copy_relocate_jnlps_demos $version $url $wsdir joal-demos copy_relocate_jnlps_demos $version $url $wsdir jogl-demos @@ -241,6 +247,9 @@ function promote-latest-builds() { echo Aggregation folder $wsdir for URL $url echo + cp -av ../util/applet-launcher.jar jar/ + cp -av ../util/junit.* jar/ + local OK=1 grep ERROR $logfile && OK=0 if [ $OK -eq 0 ] ; then |