Updating all remaining OpenDev repositories with this change.
Change-Id: Ib22df459acd28350968c0a9405dd3b11719eba0c
+++ /dev/null
-- job-template:
- name: 'opendev-{project-name}-{stream}-push-upstream-test'
-
- node: infra-build01-ubuntu1804
-
- disabled: false
-
- concurrent: true
-
- properties:
- - logrotate
-
- parameters:
- - project-parameters:
- project: 'opendev/{project}'
- branch: '{branch}'
- - nordix-gerrit-parameters
-
- scm:
- - git-scm-gerrit:
- ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
- branch: '{branch}'
- refspec: $GERRIT_REFSPEC
-
- triggers:
- - nordix-gerrit-patchset-created-or-push-upstream:
- project: 'opendev/{project}'
- branch: '{branch}'
- files: '**'
-
- wrappers:
- - build-timeout:
- timeout: 10
-
- builders:
- - shell:
- !include-raw-escape: ./push-upstream-jobs.sh
-
- publishers:
- - notify-slack:
- slack-channel: '#infra'
refspec: $GERRIT_REFSPEC
triggers:
- - nordix-gerrit-push-upstream:
+ - nordix-gerrit-patchset-created-or-push-upstream:
project: 'opendev/{project}'
branch: '{branch}'
files: '**'
branch: '{stream}'
jobs:
- - 'opendev-{project-name}-{stream}-push-upstream-test'
+ - 'opendev-{project-name}-{stream}-push-upstream'
# GERRIT_BRANCH is the _intended_ branch of the commit under review
# E.g. git push HEAD:refs/for/master => GERRIT_BRANCH='master'
-# GERRIT_TOPIC is the rest of the refspec after GERRIT_BRANCH
-refspec="$commit_hash:refs/for/$GERRIT_BRANCH/$GERRIT_TOPIC"
+# 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"
+else
+ refspec="$commit_hash:refs/for/$GERRIT_BRANCH/$GERRIT_TOPIC"
+fi
echo >&2 "Pushing to OpenDev"