blob: 14bb52127a55a13357c0417c929e750f2141ad56 [file] [log] [blame]
- defaults:
name: plugin-gh-template
targets: 'plugins/{name}:{name}'
wrappers:
- timeout:
timeout: 30
fail: true
- timestamps
- credentials-binding:
- username-password-separated:
credential-id: gerrit.googlesource.com
username: GS_GIT_USER
password: GS_GIT_PASS
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=--java_toolchain=//tools:error_prone_warnings_toolchain
scm:
- git:
remotes:
- origin:
url: https://github.com/{organization}/{repo}
- gerrit:
url: https://gerrit.googlesource.com/a/gerrit
credentials-id: gerrit.googlesource.com
branches:
- origin/{branch}
submodule:
disable: true
parent-credentials: true
skip-tag: true
triggers:
- pollscm:
cron: 'H/50 * * * *'
- job-template:
name: 'plugin-{name}-gh-bazel-{branch}'
description: >
Plugin {name} {branch} branch build with Bazel owned by {organization}
and hosted on GitHub
defaults: plugin-gh-template
builders:
- set-git-credentials
- shell: !include-raw: gerrit-bazel-build-plugin.sh
- shell: !include-raw: gerrit-bazel-gh-get-plugin-info.sh
publishers:
- archive:
artifacts: >
bazel-bin/plugins/{name}/{name}.jar*,bazel-bin/plugins/{name}/{name}.json
- job-template:
name: 'plugin-{name}-gh-bazel-{branch}-{gerrit-branch}'
description: >
Plugin {name} {branch} branch owned by {organization}
and hosted on GitHub and built with Bazel for Gerrit {gerrit-branch}
defaults: plugin-gh-template
builders:
- set-git-credentials
- shell: !include-raw: gerrit-bazel-build-plugin-branch.sh
- shell: !include-raw: gerrit-bazel-gh-get-plugin-info.sh
publishers:
- archive:
artifacts: >
bazel-bin/plugins/{name}/{name}.jar*,bazel-bin/plugins/{name}/{name}.json