Decode Base64 before parsing Gerrit comment
[releng/builder.git] / jjb / integration / multipatch-distribution.sh
index c4cf32d4815f964f6758a2ee0684bd801d30a9b7..a054e1fa042923cf6c92f0ab502fb09f6798b0ea 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-set -e
+set -ex
 
 # create a fresh empty place to build this custom distribution
 BUILD_DIR=${WORKSPACE}/patch_tester
@@ -22,12 +22,15 @@ wget "https://git.opendaylight.org/gerrit/gitweb?p=integration/distribution.git;
 cat pom.xml
 
 # Set up git committer name and email, needed for commit creation when cherry-picking.
-export EMAIL="sandbox@jenkins.opendaylight.org"
+export EMAIL="jenkins-$SILO@opendaylight.org"
 export GIT_COMMITTER_NAME="Multipatch Job"
 
 # Extract a list of patches per project from an comment trigger. An example is:
 # multipatch-build:openflowplugin:45/69445/1,genius:46/69446/1,netvirt:47/69447/1
 if [ -n "$GERRIT_EVENT_COMMENT_TEXT" ]; then
+    # Decode Base64 before parsing text.
+    GERRIT_EVENT_COMMENT_TEXT=$(echo "$GERRIT_EVENT_COMMENT_TEXT" | base64 -d)
+
     if [[ "$GERRIT_EVENT_COMMENT_TEXT" == *fast* ]]; then
         BUILD_FAST="true"
         PATCHES_TO_BUILD=$(echo "$GERRIT_EVENT_COMMENT_TEXT" | grep 'multipatch-build-fast:')