blob: 405cafca1a852ce82480de5b3ebbd2b006d00079 [file] [log] [blame]
- defaults:
name: gerrit-bazel-defaults
node: bazel-debian
properties:
- build-discarder:
days-to-keep: 20
artifact-days-to-keep: 20
- authorization:
anonymous:
- job-discover
- job-read
- job-extended-read
scm:
- git:
url: https://gerrit.googlesource.com/gerrit
branches:
- origin/{branch}
submodule:
recursive: true
skip-tag: true
basedir: gerrit
wrappers:
- timeout:
timeout: 90
type: absolute
fail: false
- timestamps
- xvfb:
installation-name: Xvfb
display-name: 1
parallel-build: false
timeout: 30
screen: 1024x768x16
additional-options: -fbdir /tmp
debug: true
shutdown-with-build: false
- raw:
xml: <jenkins.plugins.logstash.LogstashBuildWrapper plugin="logstash@1.2.0"/>
builders:
- shell: !include-raw: gerrit-bazel-build.sh
- shell: !include-raw: gerrit-bazel-test.sh
- shell: !include-raw-escape: gerrit-bazel-cat-test-log.sh
- shell: !include-raw: gerrit-deploy-api.sh
publishers:
- archive:
artifacts: >
gerrit/bazel-bin/*.war,gerrit/bazel-bin/plugins/*/*.jar,
gerrit/bazel-bin/*api/*api.jar,
gerrit/bazel-bin/gerrit-acceptance-framework/*.jar
excludes: 'gerrit/bazel-bin/plugins/core*/**/*.jar'
- job-template:
name: 'Gerrit-pipeline-{branch}'
project-type: pipeline
sandbox: true
concurrent: false
node: master
triggers:
- pollscm:
cron: 'H/10 * * * *'
properties:
- build-discarder:
days-to-keep: 256
- authorization:
anonymous:
- job-discover
- job-read
- job-extended-read
dsl: |
def retries = 3
def types = ['bazel']
def builds = [:]
def createStep(type) {{
return {{
stage(type) {{
build "Gerrit-${{type}}-{branch}"
}}
}}
}}
if ("{branch}"=="master") {{
types += 'bazel-java11'
}}
types.each {{
builds.put("${{it}}", createStep(it))
}}
node('master') {{
parallel (builds)
}}
- job-template:
name: 'Gerrit-bazel-{branch}'
description: '{name} {branch} branch build with Bazel'
defaults: gerrit-bazel-defaults
node: bazel-debian
- job-template:
name: 'Gerrit-bazel-java11-{branch}'
description: '{name} {branch} branch build with Bazel and Java 11'
defaults: gerrit-bazel-defaults
properties:
- build-discarder:
days-to-keep: 20
artifact-days-to-keep: 20
- authorization:
anonymous:
- job-discover
- job-read
- job-extended-read
- inject:
properties-content: >
BAZEL_OPTS=--host_javabase=@bazel_tools//tools/jdk:remote_jdk11
--javabase=@bazel_tools//tools/jdk:remote_jdk11
--host_java_toolchain=@bazel_tools//tools/jdk:toolchain_java11
--java_toolchain=@bazel_tools//tools/jdk:toolchain_java11
- project:
name: Gerrit-bazel
branch:
- master
- stable-3.1
- stable-3.0
- stable-2.16
- stable-2.15
jobs:
- 'Gerrit-bazel-{branch}'
- project:
name: Gerrit-bazel-java11
branch:
- master
jobs:
- 'Gerrit-bazel-java11-{branch}'
- project:
name: Gerrit-pipeline
branch:
- master
- stable-3.1
- stable-3.0
- stable-2.16
- stable-2.15
jobs:
- 'Gerrit-pipeline-{branch}'
- view:
name: Gerrit
view-type: list
columns:
- status
- weather
- job
- last-success
- last-failure
- last-duration
- build-button
regex: 'Gerrit-.*'