X-Git-Url: https://gerrit.nordix.org/gitweb?a=blobdiff_plain;f=jjb%2Fopendev%2Frebase-jobs.sh;h=90b84c22cb815e220882960c0aeaa067c05a67be;hb=1b2003f1dcf2cedae274b528aaed59204b6d7674;hp=b223f90ddd4d0020834dedcb9cba6118a2bd1cb3;hpb=f8c734adffeccfe60f7b582c2ab377ca62869dd5;p=infra%2Fcicd.git diff --git a/jjb/opendev/rebase-jobs.sh b/jjb/opendev/rebase-jobs.sh index b223f90d..90b84c22 100755 --- a/jjb/opendev/rebase-jobs.sh +++ b/jjb/opendev/rebase-jobs.sh @@ -4,6 +4,11 @@ set -o nounset 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. @@ -33,8 +38,3 @@ done 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