set -o pipefail
cd $WORKSPACE
+# Make sure the Nordix is set from Jenkins Job configuration
+# parameter: NORDIX_REMOTE and not from previous job execution
+if git remote | grep nordix > /dev/null ; then
+ git remote rm nordix
+fi
# When the GERRIT_BRANCH is not set the rebase job wasn't triggered by merge
# but it's executed as part of timer. In this case we will make sure that all
# branches from remote are synced with Nordix Gerrit.
echo "-- Pushing changes to Nordix Gerrit --"
git push nordix --all -v
echo "--------------------------------------------------------------------"
-# Make sure the Nordix is set from Jenkins Job configuration
-# parameter: NORDIX_REMOTE in next job run
-if git remote | grep nordix > /dev/null ; then
- git remote rm nordix
-fi