+# When a push-upstream job completes successfully.
+# The link to the corresponding upstream gerrit review is posted
+# on the Nordix gerrit using Gerrit API and infra user HTTP API Key.
+if grep -q http push_result.txt; then
+ URL=$(sed -ne 's/.*\(http\S*\).*/\1/p' < push_result.txt)
+ echo "URL: $URL"
+ curl --request 'POST' -H 'Content-Type:application/json' \
+ "${nordix_gerrit_rest}/a/changes/${GERRIT_CHANGE_NUMBER}/revisions/${GERRIT_PATCHSET_NUMBER}/review" \
+ --user "${GERRIT_USER}:${GERRIT_API_KEY}" \
+ --data "{\"message\": \"UPSTREAM URL: ${URL}\"}"
+fi