Skip to content

Commit

Permalink
Test the upgrade from the version 2.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed May 1, 2019
1 parent e7dd746 commit f2e7e4e
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,8 @@ dockerBuild {
}, 'Tests upgrades 230': {
test_upgrade('v230-docker', 'v230-docker', 'dockerref')
test_upgrade('v230-nondocker', 'v230-nondocker', 'nondockerref')
}, 'Tests upgrades 240': {
test_upgrade('v240', 'v240', 'dockerref')
}
}
stage('Publish') {
Expand Down
34 changes: 31 additions & 3 deletions travis/test-upgrade-convert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ then
create ${WORKSPACE}/dockerref
createnondocker ${WORKSPACE}/nondocker
createnondocker ${WORKSPACE}/nondockerref
create ${WORKSPACE}/v240 --version=2.4.0
create ${WORKSPACE}/v230-docker --version=2.3.1
createnondocker ${WORKSPACE}/v230-nondocker --version=2.3.1
mkdir --parent ${WORKSPACE}/v220
Expand Down Expand Up @@ -265,12 +266,10 @@ function v230 {
MAKE_ARGS='--makefile=testgeomapfish.mk'
DOCKER_ARGS='--env=VISIBLE_WEB_HOST=example.com --env=VISIBLE_WEB_PROTOCOL=https --env=VISIBLE_ENTRY_POINT=/'
fi
cp travis/from23-config ${WORKSPACE}/v230-$1docker/testgeomapfish/.config
cp travis/old-project.yaml ${WORKSPACE}/v230-$1docker/testgeomapfish/project.yaml.mako
cd ${WORKSPACE}/v230-$1docker/testgeomapfish
./docker-run ${DOCKER_ARGS} make ${MAKE_ARGS} project.yaml
cd -
cp travis/from23-config ${WORKSPACE}/v230-$1docker/testgeomapfish/.config
cd ${WORKSPACE}/v230-$1docker/testgeomapfish
git add project.yaml.mako .config
git commit --quiet --message="Start upgrade"
./docker-run --env=NODE_ENV make ${MAKE_ARGS} upgrade
Expand Down Expand Up @@ -320,6 +319,35 @@ then
v230 'non'
fi



function v240 {
cp travis/from23-config ${WORKSPACE}/v240/testgeomapfish/.config
cd ${WORKSPACE}/v240/testgeomapfish
./docker-run make project.yaml
git add project.yaml.mako .config
git commit --quiet --message="Start upgrade"
./docker-run --env=NODE_ENV make upgrade
./docker-run make --always-make --makefile=CONST_convert2tmpl.mk to-tmpl
if [ ! -e .UPGRADE_SUCCESS ]
then
printdiff
echo "Fail to upgrade"
exit 1
fi
./docker-run make clean-all
rm --recursive --force .UPGRADE* \
commons/testgeomapfish_commons.egg-info geoportal/testgeomapfish_geoportal.egg-info
cd -
find ${WORKSPACE}/v240 -type d -empty -delete
diff --recursive --exclude=.git ${WORKSPACE}/$1dockerref ${WORKSPACE}/v240
}

if [ "$1" = "v240" ]
then
v240
fi

if [ "$1" = "cleanup" ]
then
rm --recursive --force ${WORKSPACE}/nondockerref ${WORKSPACE}/dockerref \
Expand Down

0 comments on commit f2e7e4e

Please sign in to comment.