Fix gerrit plugins templates, it's failing with bazel node does not exist
See for example
https://gerrit-ci.gerritforge.com/job/plugin-its-phabricator-bazel-master/
please.
Follows up change 1a2990948aa9f656acec6ce47b1cc4f263179500
to do it for the other plugin templates.
Otherwise it will fail to build due to bazel no longer being defined as
a node in jenkins ci.
Change-Id: Ifcf187b5f563659a506268b0d5741093b08acafa
diff --git a/jenkins/gerrit-buck-bazel-plugin-gh-template.yaml b/jenkins/gerrit-buck-bazel-plugin-gh-template.yaml
index 101701e..764200b 100644
--- a/jenkins/gerrit-buck-bazel-plugin-gh-template.yaml
+++ b/jenkins/gerrit-buck-bazel-plugin-gh-template.yaml
@@ -1,7 +1,6 @@
-- job-template:
- name: 'plugin-{name}-gh-{branch}'
- defaults: buck-plugin
- description: "Plugin {name} {branch} branch build with BUCK owned by {organization} and hosted on GitHub\n"
+- defaults:
+ name: plugin-gh-template
+ targets: 'plugins/{name}:{name}'
wrappers:
- timeout:
timeout: 30
@@ -35,51 +34,22 @@
- pollscm:
cron: 'H/50 * * * *'
+- job-template:
+ name: 'plugin-{name}-gh-{branch}'
+ description: "Plugin {name} {branch} branch build with BUCK owned by {organization} and hosted on GitHub\n"
+ defaults: plugin-gh-template
builders:
- shell:
!include-raw: gerrit-buck-build-plugin.sh
publishers:
- archive:
- artifacts: 'buck-out/gen/plugins/{name}/{name}.jar*'
+ artifacts: >
+ buck-out/gen/plugins/{name}/{name}.jar*
- job-template:
name: 'plugin-{name}-gh-{branch}-bazel'
- defaults: buck-plugin
description: "Plugin {name} {branch} branch build with Bazel owned by {organization} and hosted on GitHub\n"
- node: bazel
- wrappers:
- - timeout:
- timeout: 30
- fail: true
- - timestamps
- - raw:
- xml: <jenkins.plugins.logstash.LogstashBuildWrapper plugin="logstash@1.2.0"/>
- properties:
- - build-discarder:
- days-to-keep: 20
- artifact-days-to-keep: 20
- - authorization:
- anonymous:
- - job-discover
- - job-read
- - job-extended-read
- scm:
- - git:
- remotes:
- - origin:
- url: https://github.com/{organization}/{repo}
- - gerrit:
- url: https://gerrit.googlesource.com/gerrit
- branches:
- - origin/{branch}
- submodule:
- disable: true
- skip-tag: true
-
- triggers:
- - pollscm:
- cron: 'H/50 * * * *'
-
+ defaults: plugin-gh-template
builders:
- shell:
!include-raw: gerrit-bazel-build-plugin.sh
diff --git a/jenkins/gerrit-buck-bazel-plugin-its-template.yaml b/jenkins/gerrit-buck-bazel-plugin-its-template.yaml
index 3213b06..aefb482 100644
--- a/jenkins/gerrit-buck-bazel-plugin-its-template.yaml
+++ b/jenkins/gerrit-buck-bazel-plugin-its-template.yaml
@@ -1,7 +1,6 @@
-- job-template:
- name: 'plugin-its-{name}-{branch}'
- defaults: buck-plugin
- description: "Plugin its-{name} {branch} branch build with BUCK\n"
+- defaults:
+ name: plugin-its-template
+ targets: 'plugins/its-{name}:its-{name}'
wrappers:
- timeout:
timeout: 30
@@ -37,6 +36,10 @@
- pollscm:
cron: 'H/50 * * * *'
+- job-template:
+ name: 'plugin-its-{name}-{branch}'
+ description: "Plugin its-{name} {branch} branch build with BUCK\n"
+ defaults: plugin-its-template
builders:
- shell:
!include-raw: gerrit-buck-build-its-plugin.sh
@@ -47,44 +50,8 @@
- job-template:
name: 'plugin-its-{name}-bazel-{branch}'
- defaults: buck-plugin
description: "Plugin its-{name} {branch} branch build with Bazel\n"
- node: bazel
- wrappers:
- - timeout:
- timeout: 30
- fail: true
- - timestamps
- - raw:
- xml: <jenkins.plugins.logstash.LogstashBuildWrapper plugin="logstash@1.2.0"/>
- logrotate:
- numToKeep: 20
- artifactNumToKeep: 20
- properties:
- - authorization:
- anonymous:
- - job-discover
- - job-read
- - job-extended-read
- scm:
- - git:
- remotes:
- - origin:
- url: https://gerrit.googlesource.com/plugins/its-{name}
- - gerrit:
- url: https://gerrit.googlesource.com/gerrit
- - base:
- url: https://gerrit.googlesource.com/plugins/its-base
- branches:
- - origin/{branch}
- submodule:
- recursive: true
- skip-tag: true
-
- triggers:
- - pollscm:
- cron: 'H/50 * * * *'
-
+ defaults: plugin-its-template
builders:
- shell:
!include-raw: gerrit-bazel-build-its-plugin.sh
diff --git a/jenkins/gerrit-buck-bazel-plugin-manual-template.yaml b/jenkins/gerrit-buck-bazel-plugin-manual-template.yaml
index baf67de..cd38e3b 100644
--- a/jenkins/gerrit-buck-bazel-plugin-manual-template.yaml
+++ b/jenkins/gerrit-buck-bazel-plugin-manual-template.yaml
@@ -1,6 +1,6 @@
-- job-template:
- name: 'pluginmanual-{name}-{branch}'
- description: "Plugin {name} {branch} manual branch build with BUCK\n"
+- defaults:
+ name: pluginmanual-template
+ targets: 'plugins/{name}:{name}'
parameters:
- string:
name: REFS_CHANGE
@@ -11,7 +11,6 @@
script-content: |
echo "REFS_CHANGE=$REFS_CHANGE" > env.properties
override-build-parameters: true
- defaults: buck-plugin
wrappers:
- timeout:
timeout: 30
@@ -41,62 +40,26 @@
recursive: true
skip-tag: true
+- job-template:
+ name: 'pluginmanual-{name}-{branch}'
+ description: "Plugin {name} {branch} manual branch build with BUCK\n"
+ defaults: pluginmanual-template
builders:
- shell:
!include-raw: gerrit-buck-build-plugin-manual.sh
-
publishers:
- archive:
- artifacts: 'buck-out/gen/plugins/{name}/*{name}*.jar*'
+ artifacts: >
+ buck-out/gen/plugins/{name}/*{name}*.jar*,
- job-template:
name: 'pluginmanual-{name}-bazel-{branch}'
description: "Plugin {name} {branch} manual branch build with Bazel\n"
- node: bazel
- parameters:
- - string:
- name: REFS_CHANGE
- description: "Refs change as provided by Download/Checkout eg: refs/changes/21/75721/1"
- properties:
- - inject:
- properties-file: env.properties
- script-content: |
- echo "REFS_CHANGE=$REFS_CHANGE" > env.properties
- override-build-parameters: true
- defaults: buck-plugin
- wrappers:
- - timeout:
- timeout: 30
- fail: true
- - timestamps
- - raw:
- xml: <jenkins.plugins.logstash.LogstashBuildWrapper plugin="logstash@1.2.0"/>
- properties:
- - build-discarder:
- days-to-keep: 20
- artifact-days-to-keep: 20
- - authorization:
- anonymous:
- - job-discover
- - job-read
- - job-extended-read
- scm:
- - git:
- remotes:
- - origin:
- url: https://gerrit.googlesource.com/plugins/{name}
- - gerrit:
- url: https://gerrit.googlesource.com/gerrit
- branches:
- - origin/{branch}
- submodule:
- recursive: true
- skip-tag: true
-
+ defaults: pluginmanual-template
builders:
- shell:
!include-raw: gerrit-bazel-build-plugin-manual.sh
-
publishers:
- archive:
- artifacts: 'bazel-genfiles/plugins/{name}/*{name}*.jar*'
+ artifacts: >
+ bazel-genfiles/plugins/{name}/*{name}*.jar*
diff --git a/jenkins/gerrit-buck-bazel-plugin-scripting-template.yaml b/jenkins/gerrit-buck-bazel-plugin-scripting-template.yaml
index f1c176c..0135a2a 100644
--- a/jenkins/gerrit-buck-bazel-plugin-scripting-template.yaml
+++ b/jenkins/gerrit-buck-bazel-plugin-scripting-template.yaml
@@ -1,7 +1,6 @@
-- job-template:
- name: 'plugin-scripting-{name}-{branch}'
- defaults: buck-plugin
- description: "Plugin scripting/{name} {branch} branch build with BUCK\n"
+- defaults:
+ name: plugin-scripting-template
+ targets: 'plugins/{name}:{name}'
wrappers:
- timeout:
timeout: 30
@@ -35,51 +34,22 @@
- pollscm:
cron: 'H/50 * * * *'
+- job-template:
+ name: 'plugin-scripting-{name}-{branch}'
+ description: "Plugin scripting/{name} {branch} branch build with BUCK\n"
+ defaults: plugin-scripting-template
builders:
- shell:
!include-raw: gerrit-buck-build-plugin.sh
publishers:
- archive:
- artifacts: 'buck-out/gen/plugins/{name}/{name}.jar*'
+ artifacts: >
+ buck-out/gen/plugins/{name}/{name}.jar*
- job-template:
name: 'plugin-scripting-{name}-bazel-{branch}'
- defaults: buck-plugin
description: "Plugin scripting/{name} {branch} branch build with Bazel\n"
- node: bazel
- wrappers:
- - timeout:
- timeout: 30
- fail: true
- - timestamps
- - raw:
- xml: <jenkins.plugins.logstash.LogstashBuildWrapper plugin="logstash@1.2.0"/>
- properties:
- - build-discarder:
- days-to-keep: 20
- artifact-days-to-keep: 20
- - authorization:
- anonymous:
- - job-discover
- - job-read
- - job-extended-read
- scm:
- - git:
- remotes:
- - origin:
- url: https://gerrit.googlesource.com/plugins/scripting/{name}
- - gerrit:
- url: https://gerrit.googlesource.com/gerrit
- branches:
- - origin/{branch}
- submodule:
- recursive: true
- skip-tag: true
-
- triggers:
- - pollscm:
- cron: 'H/50 * * * *'
-
+ defaults: plugin-scripting-template
builders:
- shell:
!include-raw: gerrit-bazel-build-plugin.sh