From: garciadeblas Date: Wed, 11 Sep 2024 13:05:49 +0000 (+0200) Subject: Fix warning about GERRIT_BRANCH parameter not set in devops-stages/stage-test.sh X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=a2f338bb73d1c4769ace6acc2a9ab4ad6891a63a;p=osm%2Fdevops.git Fix warning about GERRIT_BRANCH parameter not set in devops-stages/stage-test.sh Change-Id: Ia18af15a204c37283086a9328d3b97e764cdfb8f Signed-off-by: garciadeblas --- diff --git a/devops-stages/stage-test.sh b/devops-stages/stage-test.sh index 175835f3..8edc11c2 100755 --- a/devops-stages/stage-test.sh +++ b/devops-stages/stage-test.sh @@ -22,6 +22,8 @@ CURRENT_DIR=`pwd` CHARM_PATH="./installers/charm" NEW_CHARMS_NAMES="osm-keystone osm-lcm osm-mon osm-nbi osm-ng-ui osm-pol osm-ro vca-integrator-operator" OLD_CHARMS_NAMES="prometheus grafana" +LOCAL_GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD) +GERRIT_BRANCH=${GERRIT_BRANCH:-${LOCAL_GIT_BRANCH}} for charm in $NEW_CHARMS_NAMES; do if [ $(git diff --name-only "origin/${GERRIT_BRANCH}" -- "installers/charm/${charm}" | wc -l) -ne 0 ]; then echo "Running tox for ${charm}"