Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 1 | --- |
| 2 | # CORD lint and static code validation job templates |
Zack Williams | 92f9b1f | 2018-04-11 09:58:49 -0700 | [diff] [blame] | 3 | # These are invoked by the per-git-repo jobs stored in verify/ |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 4 | |
| 5 | # Verify that there is valid license/copyright on files |
| 6 | - job-template: |
| 7 | id: verify-licensed |
Zack Williams | 92f9b1f | 2018-04-11 09:58:49 -0700 | [diff] [blame] | 8 | name: 'verify_{project}_licensed' |
| 9 | description: | |
Zack Williams | 92f9b1f | 2018-04-11 09:58:49 -0700 | [diff] [blame] | 10 | Created by verify-licensed job-template from ci-management/jjb/lint.yaml |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 11 | |
| 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 Williams | c27ca2d | 2018-04-11 13:16:45 -0700 | [diff] [blame] | 17 | file-include-regexp: '{all-files-regexp}' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 18 | 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' |
| 35 | submodule-recursive: 'false' |
| 36 | choosing-strategy: gerrit |
| 37 | jenkins-ssh-credential: '{jenkins-ssh-credential}' |
| 38 | |
| 39 | node: '{build-node}' |
| 40 | project-type: freestyle |
| 41 | concurrent: true |
| 42 | |
| 43 | builders: |
| 44 | - shell: !include-raw-escape: shell/licensecheck.sh |
| 45 | |
| 46 | |
| 47 | # run `ansible-lint` to validate ansible playbooks/roles |
| 48 | - job-template: |
| 49 | id: verify-ansible-lint |
Zack Williams | 92f9b1f | 2018-04-11 09:58:49 -0700 | [diff] [blame] | 50 | name: 'verify_{project}_ansible-lint' |
| 51 | description: | |
Zack Williams | 92f9b1f | 2018-04-11 09:58:49 -0700 | [diff] [blame] | 52 | Created by verify-ansible-lint job-template from ci-management/jjb/lint.yaml |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 53 | |
| 54 | triggers: |
| 55 | - cord-infra-gerrit-trigger-patchset: |
| 56 | gerrit-server-name: '{gerrit-server-name}' |
| 57 | project-regexp: '^{project}$' |
| 58 | branch-regexp: '{branch-regexp}' |
Zack Williams | c27ca2d | 2018-04-11 13:16:45 -0700 | [diff] [blame] | 59 | file-include-regexp: '{all-files-regexp}' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 60 | dependency-jobs: '{dependency-jobs}' |
| 61 | |
| 62 | properties: |
| 63 | - cord-infra-properties: |
| 64 | build-days-to-keep: '{build-days-to-keep}' |
| 65 | artifact-num-to-keep: '{artifact-num-to-keep}' |
| 66 | |
| 67 | wrappers: |
| 68 | - lf-infra-wrappers: |
| 69 | build-timeout: '{build-timeout}' |
| 70 | jenkins-ssh-credential: '{jenkins-ssh-credential}' |
| 71 | |
| 72 | scm: |
| 73 | - lf-infra-gerrit-scm: |
| 74 | git-url: '$GIT_URL/$GERRIT_PROJECT' |
| 75 | refspec: '$GERRIT_REFSPEC' |
| 76 | branch: '$GERRIT_BRANCH' |
| 77 | submodule-recursive: 'false' |
| 78 | choosing-strategy: gerrit |
| 79 | jenkins-ssh-credential: '{jenkins-ssh-credential}' |
| 80 | |
| 81 | node: '{build-node}' |
| 82 | project-type: freestyle |
| 83 | concurrent: true |
| 84 | |
| 85 | builders: |
hwchiu | f4a77ce | 2019-09-06 17:15:21 -0700 | [diff] [blame] | 86 | - inject: |
| 87 | properties-content: | |
| 88 | SKIP_DIRS={skip-dirs} |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 89 | - shell: !include-raw-escape: shell/ansiblelint.sh |
| 90 | |
| 91 | |
Zack Williams | 32293ee | 2018-05-18 09:15:13 -0700 | [diff] [blame] | 92 | # run `shellcheck` to validate shell scripts charts |
| 93 | - job-template: |
| 94 | id: verify-shellcheck |
| 95 | name: 'verify_{project}_shellcheck' |
| 96 | description: | |
| 97 | Created by {id} job-template from ci-management/jjb/lint.yaml |
| 98 | |
| 99 | triggers: |
| 100 | - cord-infra-gerrit-trigger-patchset: |
| 101 | gerrit-server-name: '{gerrit-server-name}' |
| 102 | project-regexp: '^{project}$' |
| 103 | branch-regexp: '{branch-regexp}' |
| 104 | file-include-regexp: '{all-files-regexp}' |
| 105 | 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/shcheck.sh |