Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 1 | --- |
Joey Armstrong | 054d831 | 2024-02-22 12:19:37 -0500 | [diff] [blame] | 2 | # ----------------------------------------------------------------------- |
| 3 | # Copyright 2018-2024 Open Networking Foundation Contributors |
| 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | # |
| 17 | # SPDX-FileCopyrightText: 2018-2024 Open Networking Foundation Contributors |
| 18 | # SPDX-License-Identifier: Apache-2.0 |
| 19 | # ----------------------------------------------------------------------- |
| 20 | # Entropy: 0fcb5ffa-d1a4-11ee-be5e-9f44b7181764 |
| 21 | # ----------------------------------------------------------------------- |
| 22 | # Intent: |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 23 | # CORD lint and static code validation job templates |
Zack Williams | 92f9b1f | 2018-04-11 09:58:49 -0700 | [diff] [blame] | 24 | # These are invoked by the per-git-repo jobs stored in verify/ |
Joey Armstrong | 054d831 | 2024-02-22 12:19:37 -0500 | [diff] [blame] | 25 | # ----------------------------------------------------------------------- |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 26 | |
| 27 | # Verify that there is valid license/copyright on files |
| 28 | - job-template: |
| 29 | id: verify-licensed |
Zack Williams | 92f9b1f | 2018-04-11 09:58:49 -0700 | [diff] [blame] | 30 | name: 'verify_{project}_licensed' |
| 31 | description: | |
Zack Williams | 92f9b1f | 2018-04-11 09:58:49 -0700 | [diff] [blame] | 32 | Created by verify-licensed job-template from ci-management/jjb/lint.yaml |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 33 | |
| 34 | triggers: |
| 35 | - cord-infra-gerrit-trigger-patchset: |
| 36 | gerrit-server-name: '{gerrit-server-name}' |
| 37 | project-regexp: '^{project}$' |
| 38 | branch-regexp: '{branch-regexp}' |
Zack Williams | c27ca2d | 2018-04-11 13:16:45 -0700 | [diff] [blame] | 39 | file-include-regexp: '{all-files-regexp}' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 40 | dependency-jobs: '{dependency-jobs}' |
| 41 | |
| 42 | properties: |
| 43 | - cord-infra-properties: |
| 44 | build-days-to-keep: '{build-days-to-keep}' |
| 45 | artifact-num-to-keep: '{artifact-num-to-keep}' |
| 46 | |
| 47 | wrappers: |
| 48 | - lf-infra-wrappers: |
| 49 | build-timeout: '{build-timeout}' |
| 50 | jenkins-ssh-credential: '{jenkins-ssh-credential}' |
| 51 | |
| 52 | scm: |
| 53 | - lf-infra-gerrit-scm: |
| 54 | git-url: '$GIT_URL/$GERRIT_PROJECT' |
| 55 | refspec: '$GERRIT_REFSPEC' |
| 56 | branch: '$GERRIT_BRANCH' |
Zack Williams | ccc1474 | 2020-01-22 13:15:59 -0700 | [diff] [blame] | 57 | submodule-disable: '{submodule-disable}' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 58 | submodule-recursive: 'false' |
Zack Williams | ccc1474 | 2020-01-22 13:15:59 -0700 | [diff] [blame] | 59 | submodule-timeout: '{submodule-timeout}' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 60 | choosing-strategy: gerrit |
| 61 | jenkins-ssh-credential: '{jenkins-ssh-credential}' |
| 62 | |
| 63 | node: '{build-node}' |
| 64 | project-type: freestyle |
| 65 | concurrent: true |
| 66 | |
| 67 | builders: |
| 68 | - shell: !include-raw-escape: shell/licensecheck.sh |
| 69 | |
| 70 | |
| 71 | # run `ansible-lint` to validate ansible playbooks/roles |
| 72 | - job-template: |
| 73 | id: verify-ansible-lint |
Zack Williams | 92f9b1f | 2018-04-11 09:58:49 -0700 | [diff] [blame] | 74 | name: 'verify_{project}_ansible-lint' |
| 75 | description: | |
Zack Williams | 92f9b1f | 2018-04-11 09:58:49 -0700 | [diff] [blame] | 76 | 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] | 77 | |
| 78 | triggers: |
| 79 | - cord-infra-gerrit-trigger-patchset: |
| 80 | gerrit-server-name: '{gerrit-server-name}' |
| 81 | project-regexp: '^{project}$' |
| 82 | branch-regexp: '{branch-regexp}' |
Zack Williams | c27ca2d | 2018-04-11 13:16:45 -0700 | [diff] [blame] | 83 | file-include-regexp: '{all-files-regexp}' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 84 | dependency-jobs: '{dependency-jobs}' |
| 85 | |
| 86 | properties: |
| 87 | - cord-infra-properties: |
| 88 | build-days-to-keep: '{build-days-to-keep}' |
| 89 | artifact-num-to-keep: '{artifact-num-to-keep}' |
| 90 | |
| 91 | wrappers: |
| 92 | - lf-infra-wrappers: |
| 93 | build-timeout: '{build-timeout}' |
| 94 | jenkins-ssh-credential: '{jenkins-ssh-credential}' |
| 95 | |
| 96 | scm: |
| 97 | - lf-infra-gerrit-scm: |
| 98 | git-url: '$GIT_URL/$GERRIT_PROJECT' |
| 99 | refspec: '$GERRIT_REFSPEC' |
| 100 | branch: '$GERRIT_BRANCH' |
Zack Williams | ccc1474 | 2020-01-22 13:15:59 -0700 | [diff] [blame] | 101 | submodule-disable: '{submodule-disable}' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 102 | submodule-recursive: 'false' |
Zack Williams | ccc1474 | 2020-01-22 13:15:59 -0700 | [diff] [blame] | 103 | submodule-timeout: '{submodule-timeout}' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 104 | choosing-strategy: gerrit |
| 105 | jenkins-ssh-credential: '{jenkins-ssh-credential}' |
| 106 | |
| 107 | node: '{build-node}' |
| 108 | project-type: freestyle |
| 109 | concurrent: true |
| 110 | |
| 111 | builders: |
hwchiu | f4a77ce | 2019-09-06 17:15:21 -0700 | [diff] [blame] | 112 | - inject: |
| 113 | properties-content: | |
| 114 | SKIP_DIRS={skip-dirs} |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 115 | - shell: !include-raw-escape: shell/ansiblelint.sh |
| 116 | |
| 117 | |
Zack Williams | 32293ee | 2018-05-18 09:15:13 -0700 | [diff] [blame] | 118 | # run `shellcheck` to validate shell scripts charts |
| 119 | - job-template: |
| 120 | id: verify-shellcheck |
| 121 | name: 'verify_{project}_shellcheck' |
| 122 | description: | |
| 123 | Created by {id} job-template from ci-management/jjb/lint.yaml |
| 124 | |
| 125 | triggers: |
| 126 | - cord-infra-gerrit-trigger-patchset: |
| 127 | gerrit-server-name: '{gerrit-server-name}' |
| 128 | project-regexp: '^{project}$' |
| 129 | branch-regexp: '{branch-regexp}' |
| 130 | file-include-regexp: '{all-files-regexp}' |
| 131 | dependency-jobs: '{dependency-jobs}' |
| 132 | |
| 133 | properties: |
| 134 | - cord-infra-properties: |
| 135 | build-days-to-keep: '{build-days-to-keep}' |
| 136 | artifact-num-to-keep: '{artifact-num-to-keep}' |
| 137 | |
| 138 | wrappers: |
| 139 | - lf-infra-wrappers: |
| 140 | build-timeout: '{build-timeout}' |
| 141 | jenkins-ssh-credential: '{jenkins-ssh-credential}' |
| 142 | |
| 143 | scm: |
| 144 | - lf-infra-gerrit-scm: |
| 145 | git-url: '$GIT_URL/$GERRIT_PROJECT' |
| 146 | refspec: '$GERRIT_REFSPEC' |
| 147 | branch: '$GERRIT_BRANCH' |
Zack Williams | ccc1474 | 2020-01-22 13:15:59 -0700 | [diff] [blame] | 148 | submodule-disable: '{submodule-disable}' |
Zack Williams | 32293ee | 2018-05-18 09:15:13 -0700 | [diff] [blame] | 149 | submodule-recursive: 'false' |
Zack Williams | ccc1474 | 2020-01-22 13:15:59 -0700 | [diff] [blame] | 150 | submodule-timeout: '{submodule-timeout}' |
Zack Williams | 32293ee | 2018-05-18 09:15:13 -0700 | [diff] [blame] | 151 | choosing-strategy: gerrit |
| 152 | jenkins-ssh-credential: '{jenkins-ssh-credential}' |
| 153 | |
| 154 | node: '{build-node}' |
| 155 | project-type: freestyle |
| 156 | concurrent: true |
| 157 | |
| 158 | builders: |
| 159 | - shell: !include-raw-escape: shell/shcheck.sh |
Joey Armstrong | af679da | 2023-01-31 14:22:41 -0500 | [diff] [blame] | 160 | |
| 161 | # [EOF] |