Joey Armstrong | 0205d33 | 2023-04-11 17:29:23 -0400 | [diff] [blame] | 1 | # -*- makefile -*- |
| 2 | # ----------------------------------------------------------------------- |
Joey Armstrong | dc04c93 | 2024-04-01 12:14:21 -0400 | [diff] [blame] | 3 | # Copyright 2023-2024 Open Networking Foundation Contributors |
Joey Armstrong | 0205d33 | 2023-04-11 17:29:23 -0400 | [diff] [blame] | 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 | # |
Joey Armstrong | dc04c93 | 2024-04-01 12:14:21 -0400 | [diff] [blame] | 9 | # http:#www.apache.org/licenses/LICENSE-2.0 |
Joey Armstrong | 0205d33 | 2023-04-11 17:29:23 -0400 | [diff] [blame] | 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 | # ----------------------------------------------------------------------- |
Joey Armstrong | dc04c93 | 2024-04-01 12:14:21 -0400 | [diff] [blame] | 17 | # SPDX-FileCopyrightText: 2023-2024 Open Networking Foundation Contributors |
| 18 | # SPDX-License-Identifier: Apache-2.0 |
| 19 | # ----------------------------------------------------------------------- |
| 20 | # Intent: |
| 21 | # ----------------------------------------------------------------------- |
Joey Armstrong | 0205d33 | 2023-04-11 17:29:23 -0400 | [diff] [blame] | 22 | |
| 23 | ##-------------------## |
| 24 | ##---] GLOBALS [---## |
| 25 | ##-------------------## |
| 26 | .PHONY: lint-venv |
| 27 | |
| 28 | ##-------------------## |
| 29 | ##---] TARGETS [---## |
| 30 | ##-------------------## |
| 31 | ifndef NO-LINT-JJB |
| 32 | lint : lint-jjb |
| 33 | endif |
| 34 | |
| 35 | ## ----------------------------------------------------------------------- |
| 36 | ## Intent: Construct command line for linting jenkins-job-builder config |
| 37 | ## ----------------------------------------------------------------------- |
| 38 | |
| 39 | ifdef DEBUG |
| 40 | lint-jjb-args += --log_level DEBUG# # verbosity: high |
| 41 | else |
| 42 | lint-jjb-args += --log_level INFO# # verbosity: default |
| 43 | endif |
| 44 | lint-jjb-args += --ignore-cache |
| 45 | lint-jjb-args += test# # command action |
| 46 | lint-jjb-args += -o archives/job-configs# # Generated jobs written here |
| 47 | lint-jjb-args += --recursive |
| 48 | lint-jjb-args += --config-xml# # JJB v3.0 write to OUTPUT/jobname/config.xml |
| 49 | lint-jjb-args += jjb/# # JJB config sources (input) |
| 50 | |
| 51 | lint-jjb-deps := $(null) |
| 52 | lint-jjb-deps += $(venv-activate-script) |
| 53 | lint-jjb-deps += checkout-ci-management-sub-modules |
| 54 | lint-jjb: $(lint-jjb-deps) |
| 55 | $(activate) && { jenkins-jobs $(lint-jjb-args); } |
| 56 | |
| 57 | ## ----------------------------------------------------------------------- |
| 58 | ## ----------------------------------------------------------------------- |
| 59 | help :: |
| 60 | @echo ' lint-jjb Validate jjb job generation' |
| 61 | ifdef VERBOSE |
| 62 | @echo ' DEBUG=1 lint-jjb --log_level=DEBUG' |
| 63 | endif |
| 64 | |
| 65 | # [EOF] |