blob: ae448c030d3cb028614ea1743602b914e2b3b59a [file] [log] [blame]
Zack Williams7468c362018-04-06 09:52:30 -07001---
2# CORD lint and static code validation job templates
3# These are invoked by the per-git-repo jobs stored in jjb/validate/
4
5# Verify that there is valid license/copyright on files
6- job-template:
7 id: verify-licensed
8 name: 'verify-{project}-licensed'
9
10 triggers:
11 - cord-infra-gerrit-trigger-patchset:
12 gerrit-server-name: '{gerrit-server-name}'
13 project-regexp: '^{project}$'
14 branch-regexp: '{branch-regexp}'
15 dependency-jobs: '{dependency-jobs}'
16
17 properties:
18 - cord-infra-properties:
19 build-days-to-keep: '{build-days-to-keep}'
20 artifact-num-to-keep: '{artifact-num-to-keep}'
21
22 wrappers:
23 - lf-infra-wrappers:
24 build-timeout: '{build-timeout}'
25 jenkins-ssh-credential: '{jenkins-ssh-credential}'
26
27 scm:
28 - lf-infra-gerrit-scm:
29 git-url: '$GIT_URL/$GERRIT_PROJECT'
30 refspec: '$GERRIT_REFSPEC'
31 branch: '$GERRIT_BRANCH'
32 submodule-recursive: 'false'
33 choosing-strategy: gerrit
34 jenkins-ssh-credential: '{jenkins-ssh-credential}'
35
36 node: '{build-node}'
37 project-type: freestyle
38 concurrent: true
39
40 builders:
41 - shell: !include-raw-escape: shell/licensecheck.sh
42
43
44# run `ansible-lint` to validate ansible playbooks/roles
45- job-template:
46 id: verify-ansible-lint
47 name: 'verify-{project}-ansible-lint'
48
49 triggers:
50 - cord-infra-gerrit-trigger-patchset:
51 gerrit-server-name: '{gerrit-server-name}'
52 project-regexp: '^{project}$'
53 branch-regexp: '{branch-regexp}'
54 dependency-jobs: '{dependency-jobs}'
55
56 properties:
57 - cord-infra-properties:
58 build-days-to-keep: '{build-days-to-keep}'
59 artifact-num-to-keep: '{artifact-num-to-keep}'
60
61 wrappers:
62 - lf-infra-wrappers:
63 build-timeout: '{build-timeout}'
64 jenkins-ssh-credential: '{jenkins-ssh-credential}'
65
66 scm:
67 - lf-infra-gerrit-scm:
68 git-url: '$GIT_URL/$GERRIT_PROJECT'
69 refspec: '$GERRIT_REFSPEC'
70 branch: '$GERRIT_BRANCH'
71 submodule-recursive: 'false'
72 choosing-strategy: gerrit
73 jenkins-ssh-credential: '{jenkins-ssh-credential}'
74
75 node: '{build-node}'
76 project-type: freestyle
77 concurrent: true
78
79 builders:
80 - shell: !include-raw-escape: shell/ansiblelint.sh
81
82
83# run `helm lint --strict` to validate helm charts
84- job-template:
85 id: verify-helm-lint
86 name: 'verify-{project}-helm-lint'
87
88 triggers:
89 - cord-infra-gerrit-trigger-patchset:
90 gerrit-server-name: '{gerrit-server-name}'
91 project-regexp: '^{project}$'
92 branch-regexp: '{branch-regexp}'
93 dependency-jobs: '{dependency-jobs}'
94
95 properties:
96 - cord-infra-properties:
97 build-days-to-keep: '{build-days-to-keep}'
98 artifact-num-to-keep: '{artifact-num-to-keep}'
99
100 wrappers:
101 - lf-infra-wrappers:
102 build-timeout: '{build-timeout}'
103 jenkins-ssh-credential: '{jenkins-ssh-credential}'
104
105 scm:
106 - lf-infra-gerrit-scm:
107 git-url: '$GIT_URL/$GERRIT_PROJECT'
108 refspec: '$GERRIT_REFSPEC'
109 branch: '$GERRIT_BRANCH'
110 submodule-recursive: 'false'
111 choosing-strategy: gerrit
112 jenkins-ssh-credential: '{jenkins-ssh-credential}'
113
114 node: '{build-node}'
115 project-type: freestyle
116 concurrent: true
117
118 builders:
119 - shell: !include-raw-escape: shell/helmlint.sh