diff options
Diffstat (limited to 'jobs/gerrit-lint.yml')
-rw-r--r-- | jobs/gerrit-lint.yml | 154 |
1 files changed, 22 insertions, 132 deletions
diff --git a/jobs/gerrit-lint.yml b/jobs/gerrit-lint.yml index 602ce68..3039829 100644 --- a/jobs/gerrit-lint.yml +++ b/jobs/gerrit-lint.yml @@ -1,166 +1,56 @@ # This file holds all gerrit lint verifications https://jenkins.osmocom.org/jenkins/view/Jenkins-Gerrit/. -# One can simply add a gerrit job by adding project's repository to repos list. +# Add project's repositories to jobs/gerrit-verifications.yml. When +# pipeline_lint is set for that project, the pipeline will call the gerrit-lint +# job for it. - project: name: gerrit-lint - # following default values can be overridden by each repo - disabled: false - gerrit_url: 'ssh://jenkins@gerrit.osmocom.org:29418' - repos_url: '{gerrit_url}/{repos}' - gerrit_project: '{repos}' - - # in alphabetical order - repos: - - asn1c - - cellmgr-ng - - docker-playground - - libasn1c - - libgtpnl - - libosmo-abis - - libosmo-gprs - - libosmo-netif - - libosmo-pfcp - - libosmo-sccp - - libosmocore - - libsmpp34 - - libtelnet - - libusrp - - openbsc - - openggsn - - osmo-bsc - - osmo-bsc-nat - - osmo-bts - - osmo-hnodeb - - osmo-hnbgw - - osmo-upf - - osmo-ci - - - 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' + - 'gerrit-lint' -- job-template: - name: 'gerrit-{repos}-lint' +- job: + name: 'gerrit-lint' project-type: freestyle - node: osmocom-gerrit-debian9 - disabled: '{obj:disabled}' + node: osmocom-gerrit 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 + num-to-keep: 1000 description: | - Run linting on patches submitted to gerrit for - <a href="https://gerrit.osmocom.org/#/q/status:open+project:{repos}">{repos}</a> + Lint job of CI for patches sent to <a href="https://gerrit.osmocom.org">gerrit</a>. </br></br> Related issue: <a href="https://osmocom.org/issues/5087">OS#5087</a> parameters: - - string: - name: BRANCH_CI - description: | - osmo-ci.git branch - default: 'master' + !include: gerrit-verifications-parameters.yaml.inc scm: - git: basedir: 'code-from-gerrit' - url: '{obj:repos_url}' + url: '$GERRIT_REPO_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 - - git: - basedir: 'osmo-ci' - url: '{gerrit_url}/osmo-ci' - credentials-id: d5eda5e9-b59d-44ba-88d2-43473cb6e42d - branches: - - '$BRANCH_CI' - wipe-workspace: true - - 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: 'cd code-from-gerrit && ../osmo-ci/lint/lint_diff.sh HEAD~1' + - shell: | + rm -rf osmo-ci + git clone \ + --depth=1 \ + --branch="$BRANCH_CI" \ + https://gerrit.osmocom.org/osmo-ci \ + osmo-ci + git -C osmo-ci log --oneline + + cd code-from-gerrit + ../osmo-ci/lint/lint_diff.sh HEAD~1 wrappers: - ansicolor: |