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