aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>2021-04-07 23:36:04 +0200
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2021-04-07 23:37:10 +0200
commitca76aeca55f0fda97644eedef4b86e017209907c (patch)
tree5817f6396368ca83743f2ef36ab7fcfe120e275a
parent509d6162e743f6fcc36d34445bdb332acc103807 (diff)
Add automatic update of next branch
After a merge we need to rebase our -next branch to be synced with master. Bug-AGL: SPEC-3846 Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org> Change-Id: I9881589ec192ccf1668e692ea9d4e1eb6476d418
-rw-r--r--jjb/ci-AGL-verify/ci-platform-jjb.yaml54
-rw-r--r--jjb/common/include-agl-update-next.sh19
2 files changed, 73 insertions, 0 deletions
diff --git a/jjb/ci-AGL-verify/ci-platform-jjb.yaml b/jjb/ci-AGL-verify/ci-platform-jjb.yaml
index 59ebd035..8fe3865c 100644
--- a/jjb/ci-AGL-verify/ci-platform-jjb.yaml
+++ b/jjb/ci-AGL-verify/ci-platform-jjb.yaml
@@ -33,6 +33,7 @@
- ci-platform-{project}-verify-CIBT-{testmachine}
- ci-platform-{project}-verify-CIBT-complete
- ci-platform-{project}-verify-CIBT-finish-success
+ - ci-platform-{project}-merge-update-next
- ci-platform-{project}-remove-artifacts
description: "Managed by JJB. Do not Edit. \
<br>Build time graph:<br><img src='buildTimeGraph/png' />"
@@ -755,6 +756,59 @@
################################################################################################################################################################
################################################################################
+
+################################################################################
+# -merge-update-next
+################################################################################
+- job-template:
+ name: 'ci-platform-{project}-merge-update-next'
+ project-type: freestyle
+ concurrent: true
+ node: hwtest-slave
+ description: "Managed by JJB. Do not Edit. \
+ <br>Build time graph:<br><img src='buildTimeGraph/png' />"
+ parameters:
+ - string:
+ name: GERRIT_PROJECT
+ default: 'AGL/{project}'
+ description: "Project to build"
+ - string:
+ name: GERRIT_BRANCH
+ default: master
+ description: "branch to build"
+ - string:
+ name: GERRIT_REFSPEC
+ default: refs/heads/master
+ description: "refspec to build"
+ - string:
+ name: GERRIT_CHANGE_NUMBER
+ default: "8313"
+ description: "change # to build"
+ - string:
+ name: GERRIT_PATCHSET_NUMBER
+ default: "2"
+ description: "patchset # to build"
+ build-discarder:
+ days-to-keep: 30
+ artifact-days-to-keep: -1
+ artifact-num-to-keep: 5
+ wrappers:
+ - agl-infra-wrappers:
+ build-timeout: '{build-timeout}'
+ - openstack:
+ single-use: false
+ triggers:
+ - gerrit-trigger-silent-patch-merged:
+ name: 'AGL/{project}'
+ branch: 'master'
+ builders:
+ - shell:
+ !include-raw-escape:
+ - ../common/include-agl-header.sh
+ - ../common/include-agl-repo.sh
+ - ../common/include-agl-select.sh
+ - ../common/include-agl-update-next.sh
+
################################################################################
# -remove-artifacts = merge/abandon, remove artifacts and later trigger sstate
################################################################################
diff --git a/jjb/common/include-agl-update-next.sh b/jjb/common/include-agl-update-next.sh
new file mode 100644
index 00000000..266f9bc1
--- /dev/null
+++ b/jjb/common/include-agl-update-next.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+# safety net
+if test x"master" = x"${TARGETBRANCH}" ; then
+ pushd $MYPROJECT
+ git config --local --add gitreview.username agl-jobbuilder
+ git config --local --add user.email collab-it+agl-jobbuilder@linuxfoundation.org
+ pip3 install git-review
+ export PATH=/home/jenkins/.local/bin:$PATH
+ git review -s
+ git remote -v update
+ git checkout -b next gerrit/next
+ git rebase gerrit/master
+ git push -f gerrit HEAD:next -f
+ popd
+fi
+
+cd ..
+rm -rf repoclone