blob: cfc5ebab0af195c1e8efa0eefda000906f1a71e1 [file] [log] [blame]
Joey Armstrongb3a06412023-02-06 09:58:58 -05001# -*- makefile -*-
2# -----------------------------------------------------------------------
Joey Armstrong518f3572024-02-11 07:56:25 -05003# Copyright 2023-2024 Open Networking Foundation (ONF) and the ONF Contributors
Joey Armstrongb3a06412023-02-06 09:58:58 -05004#
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##-------------------##
Joey Armstrong8384f8b2023-02-06 12:46:08 -050021.PHONY: lint-venv
Joey Armstrongb3a06412023-02-06 09:58:58 -050022
23##-------------------##
24##---] TARGETS [---##
25##-------------------##
26ifndef NO-LINT-JJB
27 lint : lint-jjb
28endif
29
30## -----------------------------------------------------------------------
31## Intent: Construct command line for linting jenkins-job-builder config
32## -----------------------------------------------------------------------
33
34ifdef DEBUG
35 lint-jjb-args += --log_level DEBUG# # verbosity: high
36else
37 lint-jjb-args += --log_level INFO# # verbosity: default
38endif
39lint-jjb-args += --ignore-cache
40lint-jjb-args += test# # command action
41lint-jjb-args += -o archives/job-configs# # Generated jobs written here
42lint-jjb-args += --recursive
43lint-jjb-args += --config-xml# # JJB v3.0 write to OUTPUT/jobname/config.xml
44lint-jjb-args += jjb/# # JJB config sources (input)
45
Joey Armstrong8384f8b2023-02-06 12:46:08 -050046lint-jjb-deps := $(null)
Joey Armstrongdaa1f0a2024-04-03 18:07:59 -040047lint-jjb-deps += $(venv-activate-script)
Joey Armstrong8384f8b2023-02-06 12:46:08 -050048lint-jjb-deps += checkout-ci-management-sub-modules
49lint-jjb: $(lint-jjb-deps)
50 $(activate) && { jenkins-jobs $(lint-jjb-args); }
Joey Armstrongb3a06412023-02-06 09:58:58 -050051
52## -----------------------------------------------------------------------
53## -----------------------------------------------------------------------
54help ::
55 @echo ' lint-jjb Validate jjb job generation'
56ifdef VERBOSE
Joey Armstrong8384f8b2023-02-06 12:46:08 -050057 @echo ' DEBUG=1 lint-jjb --log_level=DEBUG'
Joey Armstrongb3a06412023-02-06 09:58:58 -050058endif
59
60# [EOF]