Joey Armstrong | b3a0641 | 2023-02-06 09:58:58 -0500 | [diff] [blame^] | 1 | # -*- makefile -*- |
| 2 | # ----------------------------------------------------------------------- |
| 3 | # Copyright 2023 Open Networking Foundation (ONF) and the ONF 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 | |
| 18 | ##-------------------## |
| 19 | ##---] GLOBALS [---## |
| 20 | ##-------------------## |
| 21 | |
| 22 | ##-------------------## |
| 23 | ##---] TARGETS [---## |
| 24 | ##-------------------## |
| 25 | ifndef NO-LINT-JJB |
| 26 | lint : lint-jjb |
| 27 | endif |
| 28 | |
| 29 | ## ----------------------------------------------------------------------- |
| 30 | ## Intent: Construct command line for linting jenkins-job-builder config |
| 31 | ## ----------------------------------------------------------------------- |
| 32 | |
| 33 | ifdef DEBUG |
| 34 | lint-jjb-args += --log_level DEBUG# # verbosity: high |
| 35 | else |
| 36 | lint-jjb-args += --log_level INFO# # verbosity: default |
| 37 | endif |
| 38 | lint-jjb-args += --ignore-cache |
| 39 | lint-jjb-args += test# # command action |
| 40 | lint-jjb-args += -o archives/job-configs# # Generated jobs written here |
| 41 | lint-jjb-args += --recursive |
| 42 | lint-jjb-args += --config-xml# # JJB v3.0 write to OUTPUT/jobname/config.xml |
| 43 | lint-jjb-args += jjb/# # JJB config sources (input) |
| 44 | |
| 45 | lint-jjb: |
| 46 | jenkins-jobs $(lint-jjb-args) |
| 47 | |
| 48 | ## ----------------------------------------------------------------------- |
| 49 | ## ----------------------------------------------------------------------- |
| 50 | help :: |
| 51 | @echo ' lint-jjb Validate jjb job generation' |
| 52 | ifdef VERBOSE |
| 53 | @echo '1 DEBUG=1 lint-jjb --log_level=DEBUG' |
| 54 | endif |
| 55 | |
| 56 | # [EOF] |