Right now, the https://ci.inria.fr/pharo/view/4.0-VM/job/PharoVM-CentOs6
Jenkins job has the following shell script embedded in Jenkins. As you can
see, there is quite a bit of logic there. Wouldn't it be better to put this
type of thing under SCM? If so, I'm happy to do it, but where would be the
best place? Is there an existing location that could fit?

#!bash -lex

cd "$WORKSPACE"
# Set environment
============================================================
ZIP_FILTER='*'
if [ "$OS" == "win" ]; then
    set -e # Stop the execution if a command fails!
    ZIP_FILTER=' *.exe *.dll'
fi

# Download the latest sources
================================================
wget --quiet files.pharo.org/vm/src/vmmaker-image.zip
wget --quiet files.pharo.org/vm/src/cog.tar.gz

# Unpack sources
=============================================================
tar -xzf cog.tar.gz || echo # echo needed for Windows build (error on
symlinks creation)
mkdir -p cog/build
mkdir -p cog/image

cd cog/image
unzip -o ../../vmmaker-image.zip

# Generate sources
===========================================================
#wget -O- get.pharo.org/vm40 | bash
#wget -O pharovm-centos65.zip
https://github.com/philippeback/pharovm-centos65/archive/master.zip
#unzip pharovm-centos65.zip
#mv pharovm-centos65-master/zeroconf-centos/* .
#rmdir pharovm-centos65-master/zeroconf-centos
# Only execute for a new slave
# cd pharovm-centos65-master
# sudo install-requisites.sh

wget -O vm.zip http://files.pharo.org/vm/pharo/linux/centos/latest.zip
unzip vm.zip
wget http://files.pharo.org/sources/PharoV30.sources.zip
unzip PharoV30.sources.zip
./pharo --nodisplay generator.image eval "PharoVMBuilder buildOnJenkins:
'$OS'" || (cat stderr; exit 1)

cd "$WORKSPACE"
tar -czf sources.tar.gz -C cog .


# Compile
====================================================================
cd cog/build
sh build.sh


# Archive
====================================================================
cd "$WORKSPACE/cog/results"

zip -r "vm.zip" $ZIP_FILTER

cp -f vm.zip ../../"${BUILD_NUMBER}.zip"
cp -f vm.zip ../../"latest.zip"
mv -f vm.zip ../../"Pharo-VM-${OS}-latest.zip"

# success
exit 0




-----
Cheers,
Sean
--
View this message in context: 
http://forum.world.st/Versioning-Jenkins-Logic-tp4820056.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.

Reply via email to