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' |
Joey Armstrong | 1cc9029 | 2024-04-02 09:27:33 -0400 | [diff] [blame] | 75 | description: >+ |
| 76 | Created by verify-ansible-lint job-template |
| 77 | from ci-management/jjb/lint.yaml |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 78 | |
| 79 | triggers: |
| 80 | - cord-infra-gerrit-trigger-patchset: |
| 81 | gerrit-server-name: '{gerrit-server-name}' |
| 82 | project-regexp: '^{project}$' |
| 83 | branch-regexp: '{branch-regexp}' |
Zack Williams | c27ca2d | 2018-04-11 13:16:45 -0700 | [diff] [blame] | 84 | file-include-regexp: '{all-files-regexp}' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 85 | dependency-jobs: '{dependency-jobs}' |
| 86 | |
| 87 | properties: |
| 88 | - cord-infra-properties: |
| 89 | build-days-to-keep: '{build-days-to-keep}' |
| 90 | artifact-num-to-keep: '{artifact-num-to-keep}' |
| 91 | |
| 92 | wrappers: |
| 93 | - lf-infra-wrappers: |
| 94 | build-timeout: '{build-timeout}' |
| 95 | jenkins-ssh-credential: '{jenkins-ssh-credential}' |
| 96 | |
| 97 | scm: |
| 98 | - lf-infra-gerrit-scm: |
| 99 | git-url: '$GIT_URL/$GERRIT_PROJECT' |
| 100 | refspec: '$GERRIT_REFSPEC' |
| 101 | branch: '$GERRIT_BRANCH' |
Zack Williams | ccc1474 | 2020-01-22 13:15:59 -0700 | [diff] [blame] | 102 | submodule-disable: '{submodule-disable}' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 103 | submodule-recursive: 'false' |
Zack Williams | ccc1474 | 2020-01-22 13:15:59 -0700 | [diff] [blame] | 104 | submodule-timeout: '{submodule-timeout}' |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 105 | choosing-strategy: gerrit |
| 106 | jenkins-ssh-credential: '{jenkins-ssh-credential}' |
| 107 | |
| 108 | node: '{build-node}' |
| 109 | project-type: freestyle |
| 110 | concurrent: true |
| 111 | |
| 112 | builders: |
hwchiu | f4a77ce | 2019-09-06 17:15:21 -0700 | [diff] [blame] | 113 | - inject: |
| 114 | properties-content: | |
| 115 | SKIP_DIRS={skip-dirs} |
Zack Williams | 7468c36 | 2018-04-06 09:52:30 -0700 | [diff] [blame] | 116 | - shell: !include-raw-escape: shell/ansiblelint.sh |
| 117 | |
| 118 | |
Zack Williams | 32293ee | 2018-05-18 09:15:13 -0700 | [diff] [blame] | 119 | # run `shellcheck` to validate shell scripts charts |
| 120 | - job-template: |
| 121 | id: verify-shellcheck |
| 122 | name: 'verify_{project}_shellcheck' |
| 123 | description: | |
| 124 | Created by {id} job-template from ci-management/jjb/lint.yaml |
| 125 | |
| 126 | triggers: |
| 127 | - cord-infra-gerrit-trigger-patchset: |
| 128 | gerrit-server-name: '{gerrit-server-name}' |
| 129 | project-regexp: '^{project}$' |
| 130 | branch-regexp: '{branch-regexp}' |
| 131 | file-include-regexp: '{all-files-regexp}' |
| 132 | dependency-jobs: '{dependency-jobs}' |
| 133 | |
| 134 | properties: |
| 135 | - cord-infra-properties: |
| 136 | build-days-to-keep: '{build-days-to-keep}' |
| 137 | artifact-num-to-keep: '{artifact-num-to-keep}' |
| 138 | |
| 139 | wrappers: |
| 140 | - lf-infra-wrappers: |
| 141 | build-timeout: '{build-timeout}' |
| 142 | jenkins-ssh-credential: '{jenkins-ssh-credential}' |
| 143 | |
| 144 | scm: |
| 145 | - lf-infra-gerrit-scm: |
| 146 | git-url: '$GIT_URL/$GERRIT_PROJECT' |
| 147 | refspec: '$GERRIT_REFSPEC' |
| 148 | branch: '$GERRIT_BRANCH' |
Zack Williams | ccc1474 | 2020-01-22 13:15:59 -0700 | [diff] [blame] | 149 | submodule-disable: '{submodule-disable}' |
Zack Williams | 32293ee | 2018-05-18 09:15:13 -0700 | [diff] [blame] | 150 | submodule-recursive: 'false' |
Zack Williams | ccc1474 | 2020-01-22 13:15:59 -0700 | [diff] [blame] | 151 | submodule-timeout: '{submodule-timeout}' |
Zack Williams | 32293ee | 2018-05-18 09:15:13 -0700 | [diff] [blame] | 152 | choosing-strategy: gerrit |
| 153 | jenkins-ssh-credential: '{jenkins-ssh-credential}' |
| 154 | |
| 155 | node: '{build-node}' |
| 156 | project-type: freestyle |
| 157 | concurrent: true |
| 158 | |
| 159 | builders: |
| 160 | - shell: !include-raw-escape: shell/shcheck.sh |
Joey Armstrong | af679da | 2023-01-31 14:22:41 -0500 | [diff] [blame] | 161 | |
| 162 | # [EOF] |