diff options
author | Andrew Gauld <ag1282@att.com> | 2018-02-21 16:45:51 -0500 |
---|---|---|
committer | Andrew Gauld <ag1282@att.com> | 2018-02-22 08:37:35 -0500 |
commit | 38273b37db94c9c8e79d82e14ea7205d9c2afcd7 (patch) | |
tree | ea2015587a884a9effe82795b8961747c12da5d0 /mvn-phase-script.sh | |
parent | e0117d81950cb8fdb5e56858d11fbfab6f3766a2 (diff) |
Make SONAR code coverage work
Change-Id: I8bd9ca4661ec8821c3fadd28c860791325ef8b36
Issue-ID: DCAEGEN2-355
Signed-off-by: Andrew Gauld <ag1282@att.com>
Diffstat (limited to 'mvn-phase-script.sh')
-rwxr-xr-x | mvn-phase-script.sh | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/mvn-phase-script.sh b/mvn-phase-script.sh index abfa93c..ae1fd65 100755 --- a/mvn-phase-script.sh +++ b/mvn-phase-script.sh @@ -19,8 +19,11 @@ # ECOMP is a trademark and service mark of AT&T Intellectual Property. +set -e + echo "running script: [$0] for module [$1] at stage [$2]" +export SETTINGS_FILE=${SETTINGS_FILE:-$HOME/.m2/settings.xml} MVN_PROJECT_MODULEID="$1" MVN_PHASE="$2" @@ -99,7 +102,7 @@ expand_templates() KEY=$(echo "$TEMPLATE" | cut -f1 -d'=') VALUE=$(echo "$TEMPLATE" | cut -f2 -d'=') VALUE2=$(echo "$TEMPLATE" | cut -f2 -d'=' |sed 's/\//\\\//g') - FILES=$(grep -rl "$KEY") + FILES=$(grep -rl "$KEY" .) # assuming FILES is not longer than 2M bytes, the limit for variable value max size on this VM for F in $FILES; do @@ -114,8 +117,8 @@ expand_templates() #if [ ! -z "$FILES" ]; then # echo "====> Resolving template $VALUE to value $VALUE" - # #CMD="grep -rl \"$VALUE\" | tr '\n' '\0' | xargs -0 sed -i \"s/{{[[:space:]]*$VALUE[[:space:]]*}}/$VALUE/g\"" - # grep -rl "$KEY" | tr '\n' '\0' | xargs -0 sed -i 's/$KEY/$VALUE2/g' + # #CMD="grep -rl \"$VALUE\" . | tr '\n' '\0' | xargs -0 sed -i \"s/{{[[:space:]]*$VALUE[[:space:]]*}}/$VALUE/g\"" + # grep -rl "$KEY" | tr '\n' '\0' . | xargs -0 sed -i 's/$KEY/$VALUE2/g' # #echo $CMD # #eval $CMD #fi @@ -216,7 +219,7 @@ upload_wagons_and_type_yamls() for WAGON in "${WAGONS[@]}" ; do WAGON_NAME=$(echo "$WAGON" | cut -f1 -d '-') WAGON_VERSION=$(echo "$WAGON" | cut -f2 -d '-') - WAGON_TYPEFILE=$(grep -rl "$WAGON_NAME" | grep yaml | head -1) + WAGON_TYPEFILE=$(grep -rl "$WAGON_NAME" . | grep yaml | head -1) upload_raw_file "$WAGON" upload_raw_file "$WAGON_TYPEFILE" |