Build automerge-plugin for Gerrit master and stable-2.14
Change-Id: Ic2bb65d985f137497ae1a3d74db6c650e37fee33
diff --git a/jenkins/gerrit-bazel-gh-get-plugin-info.sh b/jenkins/gerrit-bazel-gh-get-plugin-info.sh
new file mode 100755
index 0000000..c3cd151
--- /dev/null
+++ b/jenkins/gerrit-bazel-gh-get-plugin-info.sh
@@ -0,0 +1,5 @@
+#!/bin/bash -e
+
+curl -L https://api.github.com/repos/{organization}/{name} \
+ > bazel-genfiles/plugins/{name}/{name}.json
+
diff --git a/jenkins/gerrit-buck-bazel-plugin-gh-automerge-plugin.yaml b/jenkins/gerrit-buck-bazel-plugin-gh-automerge-plugin.yaml
new file mode 100644
index 0000000..6953767
--- /dev/null
+++ b/jenkins/gerrit-buck-bazel-plugin-gh-automerge-plugin.yaml
@@ -0,0 +1,15 @@
+- project:
+ name: automerge-plugin
+ repo: automerge-plugin
+ organization: GerritForge
+ jobs:
+ - 'plugin-{name}-gh-{branch}':
+ branch:
+ - stable-2.12
+ - stable-2.11
+ - stable-2.10
+ - 'plugin-{name}-gh-bazel-{branch}':
+ branch:
+ - master
+ - stable-2.14
+
diff --git a/jenkins/gerrit-buck-bazel-plugin-gh-template.yaml b/jenkins/gerrit-buck-bazel-plugin-gh-template.yaml
index 764200b..2af73a7 100644
--- a/jenkins/gerrit-buck-bazel-plugin-gh-template.yaml
+++ b/jenkins/gerrit-buck-bazel-plugin-gh-template.yaml
@@ -47,13 +47,15 @@
buck-out/gen/plugins/{name}/{name}.jar*
- job-template:
- name: 'plugin-{name}-gh-{branch}-bazel'
+ name: 'plugin-{name}-gh-bazel-{branch}'
description: "Plugin {name} {branch} branch build with Bazel owned by {organization} and hosted on GitHub\n"
defaults: plugin-gh-template
builders:
- shell:
!include-raw: gerrit-bazel-build-plugin.sh
+ - shell:
+ !include-raw: gerrit-bazel-gh-get-plugin-info.sh
publishers:
- archive:
artifacts: >
- bazel-genfiles/plugins/{name}/{name}.jar*
+ bazel-genfiles/plugins/{name}/{name}.jar*,bazel-genfiles/plugins/{name}/{name}.json
diff --git a/jenkins/gerrit-buck-plugin-gh-automerge-plugin.yaml b/jenkins/gerrit-buck-plugin-gh-automerge-plugin.yaml
deleted file mode 100644
index 48a77bd..0000000
--- a/jenkins/gerrit-buck-plugin-gh-automerge-plugin.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
-- project:
- name: automerge-plugin
- repo: automerge-plugin
- organization: GerritForge
- branch:
- - master
- - stable-2.12
- - stable-2.11
- - stable-2.10
- jobs:
- - 'plugin-{name}-gh-{branch}'
-