diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2015-08-03 15:05:20 +0200 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2015-08-06 14:18:35 +0200 |
commit | c31e0667170091488cfdaf1f4b7c576546832e11 (patch) | |
tree | 30ba9c4e85c44e32885f8eb85dfa4b0d692e2b23 /scripts/patches | |
parent | 0ddae3998e34e24c5877b784332085a81a1ebe7e (diff) | |
download | sonarqube-c31e0667170091488cfdaf1f4b7c576546832e11.tar.gz sonarqube-c31e0667170091488cfdaf1f4b7c576546832e11.zip |
[SCRIPTS] add support for patches to start.sh
use seperate start and stop to avoid unpredictable errors when applying patches on a live SQ instance
Diffstat (limited to 'scripts/patches')
-rw-r--r-- | scripts/patches/README.txt | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/scripts/patches/README.txt b/scripts/patches/README.txt new file mode 100644 index 00000000000..c120dda746c --- /dev/null +++ b/scripts/patches/README.txt @@ -0,0 +1,52 @@ +This directory contains patches to be used by the any script which use function call_patches from patches_utils.sh. + +Patches are files with extension ".sh". Name of the patch is the name of the file without extension (so name of patch "debug.sh" is "debug"). + +Patches run in the same directory as the calling script provided patches_utils.sh as been sourced in the calling script. + +Patches are passed on to start.sh script using command line argument "-p" by their name. +More than one can be specified using a colon. +Each patch is invoked with one argument: + * SQ_HOME: the path to the home of the started SQ instance + + +************************************************************************************************************************ + sample and common scripts are provided below +************************************************************************************************************************ + + + +****************************************** start of debug.sh ****************************************** +#!/bin/bash +############################### +# sets property sonar.web.javaAdditionalOpts in sonar.properties to activate debug +############################### + +set -euo pipefail + +source scripts/property_utils.sh + +SQ_HOME=$1 + +echo "enabling debug in conf/sonar.properties, listening on port 5005" +set_property sonar.web.javaAdditionalOpts -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 $SQ_HOME/conf/sonar.properties +****************************************** end of debug.sh ****************************************** + + +****************************************** start of views.sh ****************************************** +#!/bin/bash +############################### +# copies the sonar-views plugin jar to the extension directory +############################### + +set -euo pipefail + +source scripts/property_utils.sh + +SQ_HOME=$1 + +VIEWS_FILE=~/DEV/views/target/sonar-views-plugin-2.9-SNAPSHOT.jar +EXT_DIR=$SQ_HOME/extensions/plugins/ +echo "copy $VIEWS_FILE to $EXT_DIR" +cp $VIEWS_FILE $EXT_DIR +****************************************** end of views.sh ****************************************** |