jobs/gerrit-lint.yml: add lint jobs

Related: OS#5087
Change-Id: Ic473a5c535dfbdda55751e53fc751ede1adde7e2
This commit is contained in:
Oliver Smith 2021-06-16 13:56:34 +02:00 committed by osmith
parent 4f75177e8c
commit 1658ff58aa
2 changed files with 148 additions and 1 deletions

147
jobs/gerrit-lint.yml Normal file
View File

@ -0,0 +1,147 @@
# This file holds all gerrit lint verifications https://jenkins.osmocom.org/jenkins/view/Jenkins-Gerrit/.
# One cane simply add a gerrit job by adding project's repository to repos list.
- project:
name: gerrit-lint
# following default values can be overridden by each repo
disabled: false
cmd: '~/osmo-ci/lint/lint_diff.sh HEAD~1'
gerrit_url: 'ssh://jenkins@gerrit.osmocom.org:29418'
repos_url: '{gerrit_url}/{repos}'
gerrit_project: '{repos}'
# in alphabetical order
repos:
- asn1c
- cellmgr-ng
- libasn1c
- libgtpnl
- libosmo-abis
- libosmo-netif
- libosmo-sccp
- libosmocore
- libsmpp34
- libtelnet
- libusrp
- openbsc
- openggsn
- osmo-bsc
- osmo-bts
- osmo-ci:
# Run the lint script from the checked out branch
cmd: 'lint/lint_diff.sh HEAD~1'
- osmo_dia2gsup:
repos_url: '{gerrit_url}/erlang/{repos}'
gerrit_project: 'erlang/{repos}'
- osmo-e1-hardware
- osmo-ggsn
- osmo-gsm-manuals
- osmo_gsup:
repos_url: '{gerrit_url}/erlang/{repos}'
gerrit_project: 'erlang/{repos}'
- osmo-hlr
- osmo-iuh
- osmo-mgw
- osmo-msc
- osmo-pcap
- osmo-pcu
- osmo-python-tests:
repos_url: '{gerrit_url}/python/{repos}'
gerrit_project: 'python/{repos}'
- osmo-sgsn
- osmo_ss7:
repos_url: '{gerrit_url}/erlang/{repos}'
gerrit_project: 'erlang/{repos}'
- osmo-sip-connector
- osmo-trx
- osmocom-bb
- osmo-tetra
- osmo-sysmon
- osmo-remsim
- simtrace2
- osmo-asf4-dfu
- osmo-ccid-firmware
- osmo-e1d
- osmo-cbc
- osmo-e1-recorder
- gapk
- osmo-uecups
- osmo-el2tpd
- osmo-smlc
- osmo-gbproxy
- pysim
- osmo-ttcn3-hacks:
repos_url: 'https://gerrit.osmocom.org/{repos}'
jobs:
- 'gerrit-{repos}-lint'
- job-template:
name: 'gerrit-{repos}-lint'
project-type: freestyle
node: osmocom-gerrit-debian9
disabled: '{obj:disabled}'
retry-count: 3 # scm checkout
properties:
- build-discarder:
days-to-keep: 30
num-to-keep: 120
artifact-days-to-keep: -1
artifact-num-to-keep: -1
description: |
Run linting on patches submitted to gerrit for
<a href="https://gerrit.osmocom.org/#/q/status:open+project:{repos}">{repos}</a>
</br></br>
Related issue: <a href="https://osmocom.org/issues/5087">OS#5087</a>
scm:
- git:
url: '{obj:repos_url}'
credentials-id: d5eda5e9-b59d-44ba-88d2-43473cb6e42d
branches:
- $GERRIT_BRANCH
refspec: $GERRIT_REFSPEC
name:
choosing-strategy: gerrit
wipe-workspace: false
skip-tag: true
submodule:
recursive: false
triggers:
- gerrit:
trigger-on:
- patchset-created-event:
exclude-drafts: true
exclude-no-code-change: true
projects:
- project-compare-type: 'PLAIN'
project-pattern: '{obj:gerrit_project}'
branches:
- branch-compare-type: 'ANT'
branch-pattern: '**'
skip-vote:
successful: false
failed: false
unstable: false
notbuilt: false
silent: false
escape-quotes: false
no-name-and-email: false
trigger-for-unreviewed-patches: true
server-name: gerrit.osmocom.org
builders:
- shell: '{obj:cmd}'
# vim: expandtab tabstop=2 shiftwidth=2

View File

@ -1,4 +1,4 @@
# This file holds all gerrit verifications https://jenkins.osmocom.org/jenkins/view/Jenkins-Gerrit/.
# This file holds all gerrit build verifications https://jenkins.osmocom.org/jenkins/view/Jenkins-Gerrit/.
# One cane simply add a gerrit job by adding project's repository to repos list.
- project: