diff options
author | Sven Gothel <[email protected]> | 2020-01-05 00:52:45 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-01-05 00:52:45 +0100 |
commit | 91db9a7221db6d5af963da2b586c4875c19d048b (patch) | |
tree | 761f4537fc3d826f2ce63e857c61ae4c1666c359 /jenkins-builds | |
parent | 8e1e55d13b3cbd5a2744314b7285171a8a3ecd2f (diff) |
New release script: promote-to-release.sh
This is essentially a simplified variant as it only copies the aggregated folder
and creates the symbolic link in the deployment root dir.
The remote shell commands kicking-off release promotion on the server
from our home-machine, jenkins-builds/promote-to-release-ssh-*.sh
do pull the resulting sha512sum.txt, gpg-sign it
and push the sha512sum.txt.sig back to the server.
This allows full data integretiy over all aggregrated files
having their sha512 stored in the sha512sum.txt
Diffstat (limited to 'jenkins-builds')
-rw-r--r-- | jenkins-builds/promote-to-release-ssh-git.sh | 24 | ||||
-rw-r--r-- | jenkins-builds/promote-to-release-ssh-scp.sh | 24 | ||||
-rwxr-xr-x | jenkins-builds/promote-to-release.sh | 84 | ||||
-rwxr-xr-x | jenkins-builds/promote-to-webstart-signed.sh (renamed from jenkins-builds/promote-to-webstart.sh) | 4 |
4 files changed, 134 insertions, 2 deletions
diff --git a/jenkins-builds/promote-to-release-ssh-git.sh b/jenkins-builds/promote-to-release-ssh-git.sh new file mode 100644 index 0000000..bde6a27 --- /dev/null +++ b/jenkins-builds/promote-to-release-ssh-git.sh @@ -0,0 +1,24 @@ +#! /bin/bash + +version=v2.4.0-rc-20200104 +rootdir=/srv/www/jogamp.org/deployment +adir=archive/master/gluegen_930-joal_652-jogl_1493-jocl_1137 +sdir=archive/rc +urlb=https://jogamp.org/deployment + +ssh [email protected] "\ + cd /home/jogamp/builds ; \ + rm -rf jogamp-scripting ; \ + git clone file:///srv/scm/jogamp-scripting.git jogamp-scripting ; \ + cd jogamp-scripting ; \ + git status ; \ + ./jenkins-builds/promote-to-release.sh \ + $version \ + $rootdir \ + $adir $sdir $urlb ; \ +" + +scp [email protected]:$rootdir/$sdir/$version/sha512sum.txt . +gpg --output sha512sum.txt.sig --detach-sig sha512sum.txt +gpg --verify sha512sum.txt.sig sha512sum.txt && \ +scp sha512sum.txt.sig [email protected]:$rootdir/$sdir/$version/ diff --git a/jenkins-builds/promote-to-release-ssh-scp.sh b/jenkins-builds/promote-to-release-ssh-scp.sh new file mode 100644 index 0000000..72a0660 --- /dev/null +++ b/jenkins-builds/promote-to-release-ssh-scp.sh @@ -0,0 +1,24 @@ +#! /bin/bash + +version=v2.4.0-rc-20200104 +rootdir=/srv/www/jogamp.org/deployment +adir=archive/master/gluegen_930-joal_652-jogl_1493-jocl_1137 +sdir=archive/rc +urlb=https://jogamp.org/deployment + +ssh [email protected] "rm -rf jogamp-scripting; mkdir jogamp-scripting" +scp -rp jenkins-builds deployment [email protected]:jogamp-scripting/ + +ssh [email protected] "\ + cd jogamp-scripting ; \ + git status ; \ + ./jenkins-builds/promote-to-release.sh \ + $version \ + $rootdir \ + $adir $sdir $urlb ; \ +" + +scp [email protected]:$rootdir/$sdir/$version/sha512sum.txt . +gpg --output sha512sum.txt.sig --detach-sig sha512sum.txt +gpg --verify sha512sum.txt.sig sha512sum.txt && \ +scp sha512sum.txt.sig [email protected]:$rootdir/$sdir/$version/ diff --git a/jenkins-builds/promote-to-release.sh b/jenkins-builds/promote-to-release.sh new file mode 100755 index 0000000..8ab1ff0 --- /dev/null +++ b/jenkins-builds/promote-to-release.sh @@ -0,0 +1,84 @@ +#! /bin/bash + +## +# +# Will promote an aggregated/archived folder to a webstart folder. +# - cd root-dir ; cp -a rel-aggregation-dir -> rel-storage-dir/version ; ln -s rel-storage-dir/version . +# +# promote-to-release.sh <version> <root-dir> <rel-aggregation-dir> <rel-storage-dir> <url-base> +# eg. +# promote-to-release.sh v2.4.0-rc-20200104 \ +# /srv/www/jogamp.org/deployment \ +# archive/master/gluegen_930-joal_652-jogl_1493-jocl_1137 \ +# archive/rc \ +# https://jogamp.org/deployment \ +# +## + +version=$1 +shift + +rootdir=$1 +shift + +relaggregationdir=$1 +shift + +relstoragedir=$1 +shift + +urlbase=$1 +shift + +if [ -z "$version" -o -z "$rootdir" -o -z "$relaggregationdir" -o -z "$relstoragedir" -o -z "$urlbase" ] ; then + echo "usage $0 version root-dir rel-aggregation-dir rel-storage-dir url-base" + exit 1 +fi + +if [ ! -e "$rootdir" ] ; then + echo root-dir $rootdir does not exist + exit 1 +fi + +if [ ! -e "$rootdir/$relaggregationdir" ] ; then + echo root-dir/rel-aggregation-dir $rootdir/$relaggregationdir does not exist + exit 1 +fi + +if [ ! -e "$rootdir/$relstoragedir" ] ; then + echo root-dir/rel-storage-dir $rootdir/$relstoragedir does not exist + exit 1 +fi + +if [ -e "$rootdir/$relstoragedir/$version" ] ; then + echo root-dir/rel-storage-dir/version $rootdir/$relstoragedir/$version already exists + exit 1 +fi + +sdir=`dirname $0` + +thisdir=`pwd` + +logfile=$thisdir/`basename $0 .sh`.log + +function echo_info() { + echo + echo "Promotion release jars" + echo + echo " Version $version" + echo " Root $rootdir" + echo " Copy $relaggregationdir -> $relstoragedir" + echo " URL Base $urlbase" + echo + echo `date` + echo +} + +echo_info 2>&1 | tee $logfile + +cd $rootdir + +cp -a $relaggregationdir $relstoragedir/$version 2>&1 | tee $logfile +ln -s $relstoragedir/$version . 2>&1 | tee $logfile + + diff --git a/jenkins-builds/promote-to-webstart.sh b/jenkins-builds/promote-to-webstart-signed.sh index c74c87a..4f00605 100755 --- a/jenkins-builds/promote-to-webstart.sh +++ b/jenkins-builds/promote-to-webstart-signed.sh @@ -9,9 +9,9 @@ # - sign # - pack200 # -# promote-to-webstart.sh <version> <adir> <wsdir> <url> <pkcs12-keystore> <storepass> <key_alias> +# promote-to-webstart-signed.sh <version> <adir> <wsdir> <url> <pkcs12-keystore> <storepass> <key_alias> # eg. -# promote-to-webstart.sh v2.0-rc2 \ +# promote-to-webstart-signed.sh v2.0-rc2 \ # /srv/www/deployment/b3 \ # /srv/www/deployment/webstart-b3 \ # http://lala.lu/webstart-b3 \ |