This is to resemble state at future merge more closely,
without need of explicit rebase in Gerrit.
Change-Id: I562ca5487413ba389640ecc644dff08b0e1891c4
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
--- /dev/null
+# Make sure changes merged after patch creation are applied.
+
+set -exu
+echo "Rebase the patch on top of ${GERRIT_PROJECT}"
+cd "${GERRIT_PROJECT}"
+export EMAIL="sandbox@jenkins.opendaylight.org"
+# TODO: Is there a more appropriate e-mail?
+export GIT_COMMITTER_NAME="Rebase Macro"
+git rebase "origin/${BRANCH}"
+cd "${WORKSPACE}"
- shell:
!include-raw include-raw-integration-cleanup-workspace.sh
+# Macro: integration-rebase-patch
+# Operation: For cloned project, rebase checked-out Gerrit patch onto $BRANCH.
+# Used by: integration-patch-distribution-* job template
+
+- builder:
+ name: integration-rebase-gerrit-patch
+ builders:
+ - shell:
+ !include-raw include-raw-integration-rebase-gerrit-patch.sh
+
##############
# Publishers #
##############
refspec: '$GERRIT_REFSPEC'
- project-parameter:
project: '$GERRIT_PROJECT'
+ - integration-branch:
+ branch: '{branch}'
- integration-distribution-git-url
scm:
notbuilt: true
prebuilders:
+ - integration-rebase-gerrit-patch
- integration-get-bundle-url
- inject:
properties-file: 'bundle.txt'