From ebc457c69916210c50a55edd9124272917d51a27 Mon Sep 17 00:00:00 2001 From: Nikolaus Krismer <nikolaus.krismer@uibk.ac.at> Date: Tue, 12 Jan 2016 21:21:29 +0100 Subject: [PATCH] added jenkins deploy mode (to prevent tomcat webapp deploy on dbis-tests) --- CHANGELOG.md | 1 + Vagrantfile | 2 +- bootstrap/config.sh | 1 + bootstrap/prepareEnvironment.sh | 4 +++- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 902f3ee..2133ca5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ Upcoming version: ----------------- + - added jenkins deploy mode (to prevent tomcat webapp deploy on dbis-tests) (Nikolaus Krismer) - added missing srid for italy and st dataset (Nikolaus Krismer) - not starting tomcat on jenknis (Nikolaus Krismer) - added some more options; moved remote cache dir to owncloud (Nikolaus Krismer) diff --git a/Vagrantfile b/Vagrantfile index a8cb492..8d09859 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -80,7 +80,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.synced_folder "log/bootstrap", "/var/log/vagrant_bootstrap", create: true, owner: "vagrant", group: "vagrant" # Setup environment on startup (done using a shell script) - config.vm.provision "shell", path: "bootstrap/prepareEnvironment.sh", args: ["secretPhdPassword#2014!", (isLocalDeploy ? "true" : "false")] + config.vm.provision "shell", path: "bootstrap/prepareEnvironment.sh", args: ["secretPhdPassword#2014!", (isLocalDeploy ? "true" : "false"), (isJenkinsDeploy ? "true" : "false")] config.vm.provision "shell", path: "bootstrap/createDatabase.sh", args: ["niko", "secretPhdPassword#2014!"] config.vm.provision "shell", path: "bootstrap/importData.sh", args: ["niko", "secretPhdPassword#2014!", (deployAllDatasets ? "true" : "false")] # Optionally activate database logging (for queryTimeLogging this is done in the testcase itself now) diff --git a/bootstrap/config.sh b/bootstrap/config.sh index 5a9e5e5..670aa15 100755 --- a/bootstrap/config.sh +++ b/bootstrap/config.sh @@ -25,6 +25,7 @@ WORKING_DIR="/var/log/vagrant_bootstrap" # Parameters that can also (some must) be passed as arguments DEPLOY_ALL_DATASETS=false +IS_JENKINS_DEPLOY=false IS_LOCAL_DEPLOY=false PG_DB_NAME="isochrone" PG_DB_USER="@db_username@" diff --git a/bootstrap/prepareEnvironment.sh b/bootstrap/prepareEnvironment.sh index c7a62fd..e38723e 100755 --- a/bootstrap/prepareEnvironment.sh +++ b/bootstrap/prepareEnvironment.sh @@ -65,6 +65,7 @@ source "${SCRIPT_DIR}/config.sh" fn_arg2string TOMCAT_PASSWORD "${1}" "${TOMCAT_PASSWORD}" fn_arg2boolean IS_LOCAL_DEPLOY "${2}" "${IS_LOCAL_DEPLOY}" +fn_arg2boolean IS_JENKINS_DEPLOY "${3}" "${IS_JENKINS_DEPLOY}" ###################################### # Configuration (tool versions, ...) # @@ -212,7 +213,7 @@ if $UPDATE_DATA; then INSTALL_ISOCHRONE_DATAMODEL=true fi -if $IS_LOCAL_DEPLOY; then +if $IS_LOCAL_DEPLOY || $IS_JENKINS_DEPLOY; then # Some projects will never be installed when in local deploy mode (like latest release/snapshot from nexus) INSTALL_PROJECT_PSIPROBE=false INSTALL_ISOCHRONE_LOCAL=false @@ -360,6 +361,7 @@ echo " Bootstrapping the VM ($(date +%H:%M:%S)):" echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" echo "Operating system $DISTRI_NAME" echo " - osType: $DISTRI_TYPE" +if $IS_JENKINS_DEPLOY; then echo "Starting in jenkins test deploy mode"; fi if $IS_LOCAL_DEPLOY; then echo "Starting in local test deploy mode"; fi echo "Installing software:" if $INSTALL_HTTPD; then echo " - apache webserver"; fi -- GitLab