blob: eb06a39fcbe8521ed154179c029e536acf53afa2 [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: |
Zack Williams92f9b1f2018-04-11 09:58:49 -070010 Created by verify-licensed job-template from ci-management/jjb/lint.yaml
Zack Williams7468c362018-04-06 09:52:30 -070011
12 triggers:
13 - cord-infra-gerrit-trigger-patchset:
14 gerrit-server-name: '{gerrit-server-name}'
15 project-regexp: '^{project}$'
16 branch-regexp: '{branch-regexp}'
Zack Williamsc27ca2d2018-04-11 13:16:45 -070017 file-include-regexp: '{all-files-regexp}'
Zack Williams7468c362018-04-06 09:52:30 -070018 dependency-jobs: '{dependency-jobs}'
19
20 properties:
21 - cord-infra-properties:
22 build-days-to-keep: '{build-days-to-keep}'
23 artifact-num-to-keep: '{artifact-num-to-keep}'
24
25 wrappers:
26 - lf-infra-wrappers:
27 build-timeout: '{build-timeout}'
28 jenkins-ssh-credential: '{jenkins-ssh-credential}'
29
30 scm:
31 - lf-infra-gerrit-scm:
32 git-url: '$GIT_URL/$GERRIT_PROJECT'
33 refspec: '$GERRIT_REFSPEC'
34 branch: '$GERRIT_BRANCH'
Zack Williamsccc14742020-01-22 13:15:59 -070035 submodule-disable: '{submodule-disable}'
Zack Williams7468c362018-04-06 09:52:30 -070036 submodule-recursive: 'false'
Zack Williamsccc14742020-01-22 13:15:59 -070037 submodule-timeout: '{submodule-timeout}'
Zack Williams7468c362018-04-06 09:52:30 -070038 choosing-strategy: gerrit
39 jenkins-ssh-credential: '{jenkins-ssh-credential}'
40
41 node: '{build-node}'
42 project-type: freestyle
43 concurrent: true
44
45 builders:
46 - shell: !include-raw-escape: shell/licensecheck.sh
47
48
49# run `ansible-lint` to validate ansible playbooks/roles
50- job-template:
51 id: verify-ansible-lint
Zack Williams92f9b1f2018-04-11 09:58:49 -070052 name: 'verify_{project}_ansible-lint'
53 description: |
Zack Williams92f9b1f2018-04-11 09:58:49 -070054 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'
Zack Williamsccc14742020-01-22 13:15:59 -070079 submodule-disable: '{submodule-disable}'
Zack Williams7468c362018-04-06 09:52:30 -070080 submodule-recursive: 'false'
Zack Williamsccc14742020-01-22 13:15:59 -070081 submodule-timeout: '{submodule-timeout}'
Zack Williams7468c362018-04-06 09:52:30 -070082 choosing-strategy: gerrit
83 jenkins-ssh-credential: '{jenkins-ssh-credential}'
84
85 node: '{build-node}'
86 project-type: freestyle
87 concurrent: true
88
89 builders:
hwchiuf4a77ce2019-09-06 17:15:21 -070090 - inject:
91 properties-content: |
92 SKIP_DIRS={skip-dirs}
Zack Williams7468c362018-04-06 09:52:30 -070093 - shell: !include-raw-escape: shell/ansiblelint.sh
94
95
Zack Williams32293ee2018-05-18 09:15:13 -070096# run `shellcheck` to validate shell scripts charts
97- job-template:
98 id: verify-shellcheck
99 name: 'verify_{project}_shellcheck'
100 description: |
101 Created by {id} job-template from ci-management/jjb/lint.yaml
102
103 triggers:
104 - cord-infra-gerrit-trigger-patchset:
105 gerrit-server-name: '{gerrit-server-name}'
106 project-regexp: '^{project}$'
107 branch-regexp: '{branch-regexp}'
108 file-include-regexp: '{all-files-regexp}'
109 dependency-jobs: '{dependency-jobs}'
110
111 properties:
112 - cord-infra-properties:
113 build-days-to-keep: '{build-days-to-keep}'
114 artifact-num-to-keep: '{artifact-num-to-keep}'
115
116 wrappers:
117 - lf-infra-wrappers:
118 build-timeout: '{build-timeout}'
119 jenkins-ssh-credential: '{jenkins-ssh-credential}'
120
121 scm:
122 - lf-infra-gerrit-scm:
123 git-url: '$GIT_URL/$GERRIT_PROJECT'
124 refspec: '$GERRIT_REFSPEC'
125 branch: '$GERRIT_BRANCH'
Zack Williamsccc14742020-01-22 13:15:59 -0700126 submodule-disable: '{submodule-disable}'
Zack Williams32293ee2018-05-18 09:15:13 -0700127 submodule-recursive: 'false'
Zack Williamsccc14742020-01-22 13:15:59 -0700128 submodule-timeout: '{submodule-timeout}'
Zack Williams32293ee2018-05-18 09:15:13 -0700129 choosing-strategy: gerrit
130 jenkins-ssh-credential: '{jenkins-ssh-credential}'
131
132 node: '{build-node}'
133 project-type: freestyle
134 concurrent: true
135
136 builders:
137 - shell: !include-raw-escape: shell/shcheck.sh