X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=jjb%2Fautorelease%2Fnotify-build-failure.sh;h=a5c5c82bbe10b2678f94d9b70747fe009793ffa1;hb=9e9a7be2f7c21ca4706d9ecbab7ce5c9dacb49e5;hp=939c46b5ef06883c1f7fbf1663510f31e91af62d;hpb=9657f38ca9d7c33a3239a59a8517e7fba12589d5;p=releng%2Fbuilder.git diff --git a/jjb/autorelease/notify-build-failure.sh b/jjb/autorelease/notify-build-failure.sh index 939c46b5e..a5c5c82bb 100644 --- a/jjb/autorelease/notify-build-failure.sh +++ b/jjb/autorelease/notify-build-failure.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -l # SPDX-License-Identifier: EPL-1.0 ############################################################################## # Copyright (c) 2017 The Linux Foundation and others. @@ -38,9 +38,11 @@ REACTOR_INFO=$(awk '/Reactor Summary:/ { flag=1 } # check for project format if [[ ${REACTOR_INFO} =~ .*::*.*::*. ]]; then # extract project and artifactId from full format - ODL=$(echo "${REACTOR_INFO}" | awk -F'::' '{ gsub(/^[ \t]+|[ \t]+$/, "", $1); print $1 }') - PROJECT_=$(echo "${REACTOR_INFO}" | awk -F'::' '{ gsub(/^[ \t]+|[ \t]+$/, "", $2); print $2 }') - NAME=$(echo "${REACTOR_INFO}" | awk -F'::' '{ gsub(/^[ \t]+|[ \t]+$/, "", $3); print $3 }') + # Ex: REACTOR_INFO="ODL::sfc::odl-sfc-pot-netconf-renderer 072 " is broken down into + # NAME="ODL", PROJECT_="sfc" and NAME="odl-sfc-pot-netconf-renderer" + ODL=$(echo "${REACTOR_INFO}" | awk -F'::' '{ gsub(/^[ \t]+|[ \t]+[0-9]+[ \t]+$|[ \t]+$/, "", $1); print $1}') + PROJECT_=$(echo "${REACTOR_INFO}" | awk -F'::' '{ gsub(/^[ \t]+|[ \t]+[0-9]+[ \t]+$|[ \t]+$/, "", $2); print $2}') + NAME=$(echo "${REACTOR_INFO}" | awk -F'::' '{ gsub(/^[ \t]+|[ \t]+[0-9]+[ \t]+$|[ \t]+$/, "", $3); print $3}') else # set project from partial format ODL=""