Merge "Make test-integration to rebase before build"
authorLuis Gomez <ecelgp@gmail.com>
Tue, 15 Dec 2015 01:03:54 +0000 (01:03 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Tue, 15 Dec 2015 01:03:54 +0000 (01:03 +0000)
jjb/integration/include-raw-integration-rebase-gerrit-patch.sh [new file with mode: 0644]
jjb/integration/integration-macros.yaml
jjb/integration/integration-test-jobs.yaml

diff --git a/jjb/integration/include-raw-integration-rebase-gerrit-patch.sh b/jjb/integration/include-raw-integration-rebase-gerrit-patch.sh
new file mode 100644 (file)
index 0000000..96dca8a
--- /dev/null
@@ -0,0 +1,10 @@
+# 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}"
index d3b0ce2552d6606e9b30ad9dfef9c7e38afcc29d..8775f275217b71832ef0d13f0a66d39f48b0c6bb 100644 (file)
             !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 #
 ##############
index ba634e84aaa0ab4d08cff2be4e1e8933c0f6aea1..4ca9326efc1db5290fce22a5ed4351020f460a06 100644 (file)
             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'