Replace deprecated code for jenkins-job-builder
Replace disable-submodules with submodule: disable: true
disable-submodules is deprecated.
also logrotate is updated.
See deprecated warnnings at
https://gerrit-ci.gerritforge.com/job/gerrit-ci-scripts/235/console
Change-Id: I3e065e139e77f2f1eb0f74b9dfdd5404e99bee38
diff --git a/jenkins/gerrit-app-reviewit.yaml b/jenkins/gerrit-app-reviewit.yaml
index 5856321..f8651f9 100644
--- a/jenkins/gerrit-app-reviewit.yaml
+++ b/jenkins/gerrit-app-reviewit.yaml
@@ -4,5 +4,5 @@
- master
jobs:
- 'app-{name}-{branch}'
- commands: !include-raw-escape gerrit-app-reviewit-build.sh
+ commands: !include-raw-escape: gerrit-app-reviewit-build.sh
artifacts: 'app/build/outputs/apk/*.apk'
diff --git a/jenkins/gerrit-app-template.yaml b/jenkins/gerrit-app-template.yaml
index 3f44d3e..2842572 100644
--- a/jenkins/gerrit-app-template.yaml
+++ b/jenkins/gerrit-app-template.yaml
@@ -8,10 +8,10 @@
- timestamps
- raw:
xml: <jenkins.plugins.logstash.LogstashBuildWrapper plugin="logstash@1.2.0"/>
- logrotate:
- numToKeep: 20
- artifactNumToKeep: 20
properties:
+ - build-discarder:
+ days-to-keep: 20
+ artifact-days-to-keep: 20
- authorization:
anonymous:
- job-discover
diff --git a/jenkins/gerrit-buck-bazel-plugin-gh-template.yaml b/jenkins/gerrit-buck-bazel-plugin-gh-template.yaml
index 7d95714..101701e 100644
--- a/jenkins/gerrit-buck-bazel-plugin-gh-template.yaml
+++ b/jenkins/gerrit-buck-bazel-plugin-gh-template.yaml
@@ -9,10 +9,10 @@
- timestamps
- raw:
xml: <jenkins.plugins.logstash.LogstashBuildWrapper plugin="logstash@1.2.0"/>
- logrotate:
- numToKeep: 20
- artifactNumToKeep: 20
properties:
+ - build-discarder:
+ days-to-keep: 20
+ artifact-days-to-keep: 20
- authorization:
anonymous:
- job-discover
@@ -54,10 +54,10 @@
- timestamps
- raw:
xml: <jenkins.plugins.logstash.LogstashBuildWrapper plugin="logstash@1.2.0"/>
- logrotate:
- numToKeep: 20
- artifactNumToKeep: 20
properties:
+ - build-discarder:
+ days-to-keep: 20
+ artifact-days-to-keep: 20
- authorization:
anonymous:
- job-discover
diff --git a/jenkins/gerrit-buck-bazel-plugin-its-template.yaml b/jenkins/gerrit-buck-bazel-plugin-its-template.yaml
index 0bcded4..3213b06 100644
--- a/jenkins/gerrit-buck-bazel-plugin-its-template.yaml
+++ b/jenkins/gerrit-buck-bazel-plugin-its-template.yaml
@@ -9,10 +9,10 @@
- timestamps
- raw:
xml: <jenkins.plugins.logstash.LogstashBuildWrapper plugin="logstash@1.2.0"/>
- logrotate:
- numToKeep: 20
- artifactNumToKeep: 20
properties:
+ - build-discarder:
+ days-to-keep: 20
+ artifact-days-to-keep: 20
- authorization:
anonymous:
- job-discover
diff --git a/jenkins/gerrit-buck-bazel-plugin-manual-template.yaml b/jenkins/gerrit-buck-bazel-plugin-manual-template.yaml
index d29639c..baf67de 100644
--- a/jenkins/gerrit-buck-bazel-plugin-manual-template.yaml
+++ b/jenkins/gerrit-buck-bazel-plugin-manual-template.yaml
@@ -19,10 +19,10 @@
- timestamps
- raw:
xml: <jenkins.plugins.logstash.LogstashBuildWrapper plugin="logstash@1.2.0"/>
- logrotate:
- numToKeep: 20
- artifactNumToKeep: 20
properties:
+ - build-discarder:
+ days-to-keep: 20
+ artifact-days-to-keep: 20
- authorization:
anonymous:
- job-discover
@@ -43,7 +43,7 @@
builders:
- shell:
- !include-raw gerrit-buck-build-plugin-manual.sh
+ !include-raw: gerrit-buck-build-plugin-manual.sh
publishers:
- archive:
@@ -71,10 +71,10 @@
- timestamps
- raw:
xml: <jenkins.plugins.logstash.LogstashBuildWrapper plugin="logstash@1.2.0"/>
- logrotate:
- numToKeep: 20
- artifactNumToKeep: 20
properties:
+ - build-discarder:
+ days-to-keep: 20
+ artifact-days-to-keep: 20
- authorization:
anonymous:
- job-discover
@@ -95,7 +95,7 @@
builders:
- shell:
- !include-raw gerrit-bazel-build-plugin-manual.sh
+ !include-raw: gerrit-bazel-build-plugin-manual.sh
publishers:
- archive:
diff --git a/jenkins/gerrit-buck-bazel-plugin-scripting-template.yaml b/jenkins/gerrit-buck-bazel-plugin-scripting-template.yaml
index ab78a9d..f1c176c 100644
--- a/jenkins/gerrit-buck-bazel-plugin-scripting-template.yaml
+++ b/jenkins/gerrit-buck-bazel-plugin-scripting-template.yaml
@@ -9,10 +9,10 @@
- timestamps
- raw:
xml: <jenkins.plugins.logstash.LogstashBuildWrapper plugin="logstash@1.2.0"/>
- logrotate:
- numToKeep: 20
- artifactNumToKeep: 20
properties:
+ - build-discarder:
+ days-to-keep: 20
+ artifact-days-to-keep: 20
- authorization:
anonymous:
- job-discover
@@ -54,10 +54,10 @@
- timestamps
- raw:
xml: <jenkins.plugins.logstash.LogstashBuildWrapper plugin="logstash@1.2.0"/>
- logrotate:
- numToKeep: 20
- artifactNumToKeep: 20
properties:
+ - build-discarder:
+ days-to-keep: 20
+ artifact-days-to-keep: 20
- authorization:
anonymous:
- job-discover
diff --git a/jenkins/gerrit-buck-bazel-plugin-template.yaml b/jenkins/gerrit-buck-bazel-plugin-template.yaml
index 08631a8..6d93b8f 100644
--- a/jenkins/gerrit-buck-bazel-plugin-template.yaml
+++ b/jenkins/gerrit-buck-bazel-plugin-template.yaml
@@ -9,10 +9,10 @@
- timestamps
- raw:
xml: <jenkins.plugins.logstash.LogstashBuildWrapper plugin="logstash@1.2.0"/>
- logrotate:
- numToKeep: 20
- artifactNumToKeep: 20
properties:
+ - build-discarder:
+ days-to-keep: 20
+ artifact-days-to-keep: 20
- authorization:
anonymous:
- job-discover
@@ -55,10 +55,10 @@
- timestamps
- raw:
xml: <jenkins.plugins.logstash.LogstashBuildWrapper plugin="logstash@1.2.0"/>
- logrotate:
- numToKeep: 20
- artifactNumToKeep: 20
properties:
+ - build-discarder:
+ days-to-keep: 20
+ artifact-days-to-keep: 20
- authorization:
anonymous:
- job-discover
diff --git a/jenkins/gerrit-buck-bazel-template.yaml b/jenkins/gerrit-buck-bazel-template.yaml
index 9ae120e..4df8273 100644
--- a/jenkins/gerrit-buck-bazel-template.yaml
+++ b/jenkins/gerrit-buck-bazel-template.yaml
@@ -3,8 +3,6 @@
project-type: flow
concurrent: false
needs-workspace: true
- logrotate:
- numToKeep: 256
scm:
- git:
url: https://gerrit.googlesource.com/gerrit
@@ -18,6 +16,9 @@
- pollscm:
cron: 'H/10 * * * *'
properties:
+ properties:
+ - build-discarder:
+ days-to-keep: 256
- authorization:
anonymous:
- job-discover
@@ -50,10 +51,10 @@
shutdown-with-build: false
- raw:
xml: <jenkins.plugins.logstash.LogstashBuildWrapper plugin="logstash@1.2.0"/>
- logrotate:
- numToKeep: 20
- artifactNumToKeep: 20
properties:
+ - build-discarder:
+ days-to-keep: 20
+ artifact-days-to-keep: 20
- authorization:
anonymous:
- job-discover
@@ -103,10 +104,10 @@
shutdown-with-build: false
- raw:
xml: <jenkins.plugins.logstash.LogstashBuildWrapper plugin="logstash@1.2.0"/>
- logrotate:
- numToKeep: 20
- artifactNumToKeep: 20
properties:
+ - build-discarder:
+ days-to-keep: 20
+ artifact-days-to-keep: 20
- authorization:
anonymous:
- job-discover
diff --git a/jenkins/gerrit-buck-plugin-gitblit.yaml b/jenkins/gerrit-buck-plugin-gitblit.yaml
index 89102c6..97402cb 100644
--- a/jenkins/gerrit-buck-plugin-gitblit.yaml
+++ b/jenkins/gerrit-buck-plugin-gitblit.yaml
@@ -9,9 +9,10 @@
- timestamps
- raw:
xml: <jenkins.plugins.logstash.LogstashBuildWrapper plugin="logstash@1.2.0"/>
- logrotate:
- numToKeep: 20
- artifactNumToKeep: 20
+ properties:
+ - build-discarder:
+ days-to-keep: 20
+ artifact-days-to-keep: 20
properties:
- authorization:
anonymous:
diff --git a/jenkins/gerrit-mvn-plugin-template.yaml b/jenkins/gerrit-mvn-plugin-template.yaml
index 859f72e..c7394dd 100644
--- a/jenkins/gerrit-mvn-plugin-template.yaml
+++ b/jenkins/gerrit-mvn-plugin-template.yaml
@@ -9,10 +9,10 @@
- timestamps
- raw:
xml: <jenkins.plugins.logstash.LogstashBuildWrapper plugin="logstash@1.2.0"/>
- logrotate:
- numToKeep: 20
- artifactNumToKeep: 20
properties:
+ - build-discarder:
+ days-to-keep: 20
+ artifact-days-to-keep: 20
- authorization:
anonymous:
- job-discover
diff --git a/jenkins/gerrit-verifier.yaml b/jenkins/gerrit-verifier.yaml
index 336e6b7..9fa4bd8 100644
--- a/jenkins/gerrit-verifier.yaml
+++ b/jenkins/gerrit-verifier.yaml
@@ -72,7 +72,8 @@
refspec: $REFSPEC
branches:
- $BRANCH
- disable-submodules: true
+ submodule:
+ disable: true
skip-tag: true
basedir: gerrit
wrappers:
diff --git a/jenkins/gitiles-webapp-manual.yaml b/jenkins/gitiles-webapp-manual.yaml
index 226d6d7..f3d1f3c 100644
--- a/jenkins/gitiles-webapp-manual.yaml
+++ b/jenkins/gitiles-webapp-manual.yaml
@@ -10,9 +10,10 @@
- raw:
xml: <jenkins.plugins.logstash.LogstashBuildWrapper plugin="logstash@1.2.0"/>
- logrotate:
- numToKeep: 20
- artifactNumToKeep: 20
+ properties:
+ - build-discarder:
+ days-to-keep: 20
+ artifact-days-to-keep: 20
parameters:
- string:
diff --git a/jenkins/gitiles-webapp.yaml b/jenkins/gitiles-webapp.yaml
index cd757ef..1ddccbf 100644
--- a/jenkins/gitiles-webapp.yaml
+++ b/jenkins/gitiles-webapp.yaml
@@ -8,15 +8,15 @@
- timestamps
- raw:
xml: <jenkins.plugins.logstash.LogstashBuildWrapper plugin="logstash@1.2.0"/>
- logrotate:
- numToKeep: 20
- artifactNumToKeep: 20
properties:
+ - build-discarder:
+ days-to-keep: 20
+ artifact-days-to-keep: 20
- authorization:
anonymous:
- job-discover
- job-read
- - job-extended-read
+ - job-extended-read
scm:
- git:
url: https://gerrit.googlesource.com/gitiles
@@ -27,7 +27,7 @@
triggers:
- pollscm: 'H/50 * * * *'
-
+
builders:
- shell: |
set +x