Cross-build Gerrit UI plugins
Enable the build of Gerrit UI plugins from a single
branch to a set of Gerrit branches.
Change-Id: Id03d002aa21405a3fb9d1e1a269b1d9977373646
diff --git a/jenkins/gerrit-bazel-plugin-template.yaml b/jenkins/gerrit-bazel-plugin-template.yaml
index 447b59b..8191a2b 100644
--- a/jenkins/gerrit-bazel-plugin-template.yaml
+++ b/jenkins/gerrit-bazel-plugin-template.yaml
@@ -143,6 +143,39 @@
{extra-artifacts}
- job-template:
+ name: 'ui-plugin-{name}-bazel-{branch}-{gerrit-branch}'
+ description: 'UI Plugin {name} {branch} branch build with Bazel for Gerrit {gerrit-branch}'
+ defaults: plugin-template-bazel
+ node: bazel-debian
+ class: plugins
+ project-name: plugins%2F{name}
+ extra-artifacts: ''
+ scm:
+ - git:
+ remotes:
+ - origin:
+ url: https://gerrit.googlesource.com/a/plugins/{name}
+ credentials-id: gerrit.googlesource.com
+ branches:
+ - origin/{branch}
+ submodule:
+ recursive: true
+ parent-credentials: true
+ skip-tag: true
+ do-not-fetch-tags: true
+ builders:
+ - set-git-credentials
+ - shell: !include-raw: gerrit-bazel-build-plugin-branch.sh
+ - shell: !include-raw: gerrit-bazel-get-project-info.sh
+ publishers:
+ - archive:
+ artifacts: >
+ bazel-bin/plugins/{name}/{name}.js,
+ bazel-bin/plugins/{name}/{name}.html,
+ bazel-bin/plugins/{name}/{name}.json,
+ {extra-artifacts}
+
+- job-template:
name: 'plugin-{name}-bazel-{branch}-{gerrit-branch}'
class: plugins
node: bazel-debian