blob: 171c469a5523943438b13679b4053973694dfd67 [file] [log] [blame]
Zack Williams7468c362018-04-06 09:52:30 -07001---
2# CORD lint and static code validation job templates
Zack Williams92f9b1f2018-04-11 09:58:49 -07003# These are invoked by the per-git-repo jobs stored in verify/
Zack Williams7468c362018-04-06 09:52:30 -07004
5# Verify that there is valid license/copyright on files
6- job-template:
7 id: verify-licensed
Zack Williams92f9b1f2018-04-11 09:58:49 -07008 name: 'verify_{project}_licensed'
9 description: |
10 <!-- Managed by Jenkins Job Builder -->
11 Created by verify-licensed job-template from ci-management/jjb/lint.yaml
Zack Williams7468c362018-04-06 09:52:30 -070012
13 triggers:
14 - cord-infra-gerrit-trigger-patchset:
15 gerrit-server-name: '{gerrit-server-name}'
16 project-regexp: '^{project}$'
17 branch-regexp: '{branch-regexp}'
Zack Williamsc27ca2d2018-04-11 13:16:45 -070018 file-include-regexp: '{all-files-regexp}'
Zack Williams7468c362018-04-06 09:52:30 -070019 dependency-jobs: '{dependency-jobs}'
20
21 properties:
22 - cord-infra-properties:
23 build-days-to-keep: '{build-days-to-keep}'
24 artifact-num-to-keep: '{artifact-num-to-keep}'
25
26 wrappers:
27 - lf-infra-wrappers:
28 build-timeout: '{build-timeout}'
29 jenkins-ssh-credential: '{jenkins-ssh-credential}'
30
31 scm:
32 - lf-infra-gerrit-scm:
33 git-url: '$GIT_URL/$GERRIT_PROJECT'
34 refspec: '$GERRIT_REFSPEC'
35 branch: '$GERRIT_BRANCH'
36 submodule-recursive: 'false'
37 choosing-strategy: gerrit
38 jenkins-ssh-credential: '{jenkins-ssh-credential}'
39
40 node: '{build-node}'
41 project-type: freestyle
42 concurrent: true
43
44 builders:
45 - shell: !include-raw-escape: shell/licensecheck.sh
46
47
48# run `ansible-lint` to validate ansible playbooks/roles
49- job-template:
50 id: verify-ansible-lint
Zack Williams92f9b1f2018-04-11 09:58:49 -070051 name: 'verify_{project}_ansible-lint'
52 description: |
53 <!-- Managed by Jenkins Job Builder -->
54 Created by verify-ansible-lint job-template from ci-management/jjb/lint.yaml
Zack Williams7468c362018-04-06 09:52:30 -070055
56 triggers:
57 - cord-infra-gerrit-trigger-patchset:
58 gerrit-server-name: '{gerrit-server-name}'
59 project-regexp: '^{project}$'
60 branch-regexp: '{branch-regexp}'
Zack Williamsc27ca2d2018-04-11 13:16:45 -070061 file-include-regexp: '{all-files-regexp}'
Zack Williams7468c362018-04-06 09:52:30 -070062 dependency-jobs: '{dependency-jobs}'
63
64 properties:
65 - cord-infra-properties:
66 build-days-to-keep: '{build-days-to-keep}'
67 artifact-num-to-keep: '{artifact-num-to-keep}'
68
69 wrappers:
70 - lf-infra-wrappers:
71 build-timeout: '{build-timeout}'
72 jenkins-ssh-credential: '{jenkins-ssh-credential}'
73
74 scm:
75 - lf-infra-gerrit-scm:
76 git-url: '$GIT_URL/$GERRIT_PROJECT'
77 refspec: '$GERRIT_REFSPEC'
78 branch: '$GERRIT_BRANCH'
79 submodule-recursive: 'false'
80 choosing-strategy: gerrit
81 jenkins-ssh-credential: '{jenkins-ssh-credential}'
82
83 node: '{build-node}'
84 project-type: freestyle
85 concurrent: true
86
87 builders:
88 - shell: !include-raw-escape: shell/ansiblelint.sh
89
90
91# run `helm lint --strict` to validate helm charts
92- job-template:
93 id: verify-helm-lint
Zack Williams92f9b1f2018-04-11 09:58:49 -070094 name: 'verify_{project}_helm-lint'
95 description: |
96 <!-- Managed by Jenkins Job Builder -->
97 Created by verify-helm-lint job-template from ci-management/jjb/lint.yaml
Zack Williams7468c362018-04-06 09:52:30 -070098
99 triggers:
100 - cord-infra-gerrit-trigger-patchset:
101 gerrit-server-name: '{gerrit-server-name}'
102 project-regexp: '^{project}$'
103 branch-regexp: '{branch-regexp}'
Zack Williamsc27ca2d2018-04-11 13:16:45 -0700104 file-include-regexp: '{all-files-regexp}'
Zack Williams7468c362018-04-06 09:52:30 -0700105 dependency-jobs: '{dependency-jobs}'
106
107 properties:
108 - cord-infra-properties:
109 build-days-to-keep: '{build-days-to-keep}'
110 artifact-num-to-keep: '{artifact-num-to-keep}'
111
112 wrappers:
113 - lf-infra-wrappers:
114 build-timeout: '{build-timeout}'
115 jenkins-ssh-credential: '{jenkins-ssh-credential}'
116
117 scm:
118 - lf-infra-gerrit-scm:
119 git-url: '$GIT_URL/$GERRIT_PROJECT'
120 refspec: '$GERRIT_REFSPEC'
121 branch: '$GERRIT_BRANCH'
122 submodule-recursive: 'false'
123 choosing-strategy: gerrit
124 jenkins-ssh-credential: '{jenkins-ssh-credential}'
125
126 node: '{build-node}'
127 project-type: freestyle
128 concurrent: true
129
130 builders:
131 - shell: !include-raw-escape: shell/helmlint.sh