blob: 7b537b9def25fe07b4d09c6572118bd9c17a5567 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
# This file holds all gerrit lint verifications https://jenkins.osmocom.org/jenkins/view/Jenkins-Gerrit/.
# 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
jobs:
- 'gerrit-lint'
- job:
name: 'gerrit-lint'
project-type: freestyle
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
description: |
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'
- string:
name: GERRIT_PROJECT
description: set by gerrit verification pipeline job
- string:
name: GERRIT_CHANGE_NUMBER
description: set by gerrit verification pipeline job
- string:
name: GERRIT_PATCHSET_NUMBER
description: set by gerrit verification pipeline job
- string:
name: GERRIT_BRANCH
description: set by gerrit verification pipeline job
- string:
name: GERRIT_HOST
description: set by gerrit verification pipeline job
- string:
name: GERRIT_PATCHSET_REVISION
description: set by gerrit verification pipeline job
- string:
name: GERRIT_PORT
description: set by gerrit verification pipeline job
- string:
name: GERRIT_REFSPEC
description: set by gerrit verification pipeline job
- string:
name: GERRIT_REPO_URL
description: set by gerrit verification pipeline job
scm:
- git:
basedir: 'code-from-gerrit'
url: '$GERRIT_REPO_URL'
credentials-id: d5eda5e9-b59d-44ba-88d2-43473cb6e42d
branches:
- $GERRIT_BRANCH
refspec: $GERRIT_REFSPEC
choosing-strategy: gerrit
wipe-workspace: false
skip-tag: true
submodule:
recursive: false
builders:
- 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:
colormap: xterm
- ssh-agent-credentials:
users:
- d5eda5e9-b59d-44ba-88d2-43473cb6e42d
# vim: expandtab tabstop=2 shiftwidth=2
|