X-Git-Url: https://gerrit.nordix.org/gitweb?a=blobdiff_plain;f=jjb%2Fopendev%2Fpush-upstream-jobs.sh;h=ef22aba2faab37c93445a314a6b5be9ce85ed73c;hb=54ae9c9606b95b99a84f7d70cb50342360240922;hp=0e1326f93126b8cb2345b53883319948bf4dda1a;hpb=b113852c4b3d4f1bd9616ad904e767c608a6012d;p=infra%2Fcicd.git diff --git a/jjb/opendev/push-upstream-jobs.sh b/jjb/opendev/push-upstream-jobs.sh index 0e1326f9..ef22aba2 100755 --- a/jjb/opendev/push-upstream-jobs.sh +++ b/jjb/opendev/push-upstream-jobs.sh @@ -58,9 +58,9 @@ opendev_remote_url="ssh://$username@$opendev_gerrit_base/$opendev_project" # GERRIT_TOPIC is the rest of the refspec after GERRIT_BRANCH when the topic # is set for the change. if [ -z "${GERRIT_TOPIC:-}" ] ; then - refspec="$commit_hash:refs/for/$GERRIT_BRANCH" + refspec="${commit_hash}:refs/for/${GERRIT_BRANCH}" else - refspec="$commit_hash:refs/for/$GERRIT_BRANCH/$GERRIT_TOPIC" + refspec="${commit_hash}:refs/for/${GERRIT_BRANCH}%topic=${GERRIT_TOPIC}" fi echo >&2 "Pushing to OpenDev" @@ -68,7 +68,7 @@ echo >&2 "Pushing to OpenDev" # do not fail if git push fails as in case of no new changes we want to succeed. See below. set +o pipefail -git push "$opendev_remote_url" "$refspec" 2>&1 | tee push_result.txt +git push --no-thin "$opendev_remote_url" "$refspec" 2>&1 | tee push_result.txt push_result=${PIPESTATUS[0]} # make the job a success if the above git push fails due to no new changes are needed