Automatic Deployment to CVMFS
Description
Automatically deploy tagged version to CVMFS (CLICdp work space)
Make independent artifacts with release tarballs from builds (own jobs?)
Links / references
CI configuration for SSH runner: https://gitlab.cern.ch/CLICdp/SoftwareConfigurations/iLCSoft/blob/master/.gitlab-ci.yml#L123
adapt scripts as used by ILCSoft:
#!/bin/bash
#Get the line for the CVMFS status and chech if server is transaction
clicdp_status=`cvmfs_server list | grep clicdp`
if [[ $clicdp_status == *"(stratum0 / local)"* ]]; then
echo "I am not in transaction"
# Start transaction
cvmfs_server transaction clicdp.cern.ch
# Deploy the nightly iLCSoft build
/home/cvclicdp/cron_jobs/install_gitlab_ilcsoft.sh $1
# Publish changes
cvmfs_server publish clicdp.cern.ch
exit 0
else
(>&2 echo "#################################")
(>&2 echo "### CVMFS Transastion ongoing ###")
(>&2 echo "### Nightly deploy cancelled ###")
(>&2 echo "#################################")
exit 1
fi
#!/bin/bash
cd /home/cvclicdp/
#Extract tars
echo "Extract the .tar files"
tar xf ilcsoft_gcc.tar
tar xf ilcsoft_gcc7.tar
tar xf ilcsoft_llvm.tar
tar xf ilcsoft_llvm5.tar
#Deleting old nightly build if it is not a tag
if [ "$1" == "nightly" ]; then
echo "Deleting old nightly build"
rm -rf /cvmfs/clicdp.cern.ch/iLCSoft/builds/nightly
fi
# Move new build into place
echo "Moving new build into place"
mv /home/cvclicdp/cvmfs/clicdp.cern.ch/iLCSoft/builds/$1 /cvmfs/clicdp.cern.ch/iLCSoft/builds/
# Clean up old stuff
rm -f /home/cvclicdp/ilcsoft_gcc.tar
rm -f /home/cvclicdp/ilcsoft_gcc7.tar
rm -f /home/cvclicdp/ilcsoft_llvm.tar
rm -f /home/cvclicdp/ilcsoft_llvm5.tar
rm -rf /home/cvclicdp/cvmfs