blob: 1c63061d448fbcde72dc077f4a5236f999afde74 [file] [log] [blame]
Joey Armstrong03588972022-12-07 17:30:09 -05001# -*- makefile -*-
2# -----------------------------------------------------------------------
Joey Armstrong07475092023-01-26 10:56:13 -05003# Copyright 2022-2023 Open Networking Foundation (ONF) and the ONF Contributors (ONF) and the ONF Contributors
Joey Armstrong03588972022-12-07 17:30:09 -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# SPDX-FileCopyrightText: 2022 Open Networking Foundation (ONF) and the ONF Contributors
18# SPDX-License-Identifier: Apache-2.0
19# -----------------------------------------------------------------------
20
21GIT ?= /usr/bin/git
22
Joey Armstrong6fdbccf2023-01-25 20:20:10 -050023##--------------------##
24##---] INCLUDES [---##
25##--------------------##
26include $(MAKEDIR)/lint/helm/tools.mk
27include $(MAKEDIR)/lint/helm/branch-detect.mk
28include $(MAKEDIR)/lint/helm/chart.mk
29include $(MAKEDIR)/lint/helm/helm.mk
Joey Armstrong748ff282023-08-07 12:27:31 -040030include $(MAKEDIR)/lint/helm/helmrepo.mk
Joey Armstrong03588972022-12-07 17:30:09 -050031
32##-------------------##
33##---] TARGETS [---##
34##-------------------##
Joey Armstrong03588972022-12-07 17:30:09 -050035
36## -----------------------------------------------------------------------
37## [TODO] Extract hardcoded values from lint.sh:
38## o pass as args
39## o pass through configs:
40## o consumer/makefile should prep then invoke htmllint:
41## + arbitrary repository commit hooks can match build behavior.
42## -----------------------------------------------------------------------
43lint-helm-deps:
44 helm repo add stable https://charts.helm.sh/stable
45 helm repo add rook-release https://charts.rook.io/release
46 helm repo add cord https://charts.opencord.org
47
48## -----------------------------------------------------------------------
Joey Armstrong03588972022-12-07 17:30:09 -050049## Intent: Display target help with context
50## % make help
51## % make help VERBOSE=1
52## -----------------------------------------------------------------------
53help ::
Joey Armstrong6fdbccf2023-01-25 20:20:10 -050054 @echo
55 @echo '[LINT: helm]'
56 @echo " lint-chart chart_version_check.sh"
57
58 @echo " lint-helm Syntax check helm configs"
Joey Armstrong03588972022-12-07 17:30:09 -050059ifdef VERBOSE
Joey Armstrong6fdbccf2023-01-25 20:20:10 -050060 @echo ' COMPARISON_BRANCH="origin/master" make lint-chart'
Joey Armstrong03588972022-12-07 17:30:09 -050061endif
Joey Armstrong6fdbccf2023-01-25 20:20:10 -050062
63 @echo " lint-helm-deps Configure dependent helm charts"
Joey Armstrong03588972022-12-07 17:30:09 -050064
65## -----------------------------------------------------------------------
66## Intent: Future enhancement list
67## -----------------------------------------------------------------------
68todo ::
69 @ehco "[TODO: makefiles/helm/include.mk]"
70 @echo " o Generalize script logic, remove hardcoded values,"
71 @echo " o Update gerrit/jenkins/makefiles/interactive:"
72 @echo " Lint behavior should be consistent everywhere."
73 @echo " o Fix COMPARSION_BRANCH logic:"
74 @echo " helm-repo-tools/chart_version_check contains 'opencord/master'"
75 @echo " o Refactor 2 jenkins jobs and lint-helm-deps"
76 @echo " use everywhere: % make lint-helm"
77
78# [EOF]