blob: e8546342de0aa21fed2e2d32a4dffafa791852b1 [file] [log] [blame]
Joey Armstrongee4d8262023-08-22 15:19:19 -04001# -*- makefile -*-
2# -----------------------------------------------------------------------
Joey Armstrongaadcaa42024-02-01 19:54:17 -05003# Copyright 2022-2024 Open Networking Foundation (ONF) and the ONF Contributors
Joey Armstrongee4d8262023-08-22 15:19:19 -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#
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#
Joey Armstrongaadcaa42024-02-01 19:54:17 -050017# SPDX-FileCopyrightText: 2024 Open Networking Foundation (ONF) and the ONF Contributors
Joey Armstrongee4d8262023-08-22 15:19:19 -040018# SPDX-License-Identifier: Apache-2.0
19# -----------------------------------------------------------------------
20
21GIT ?= /usr/bin/git
22
23##--------------------##
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
30include $(MAKEDIR)/lint/helm/helmrepo.mk
31
32##-------------------##
33##---] TARGETS [---##
34##-------------------##
35
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## -----------------------------------------------------------------------
49## Intent: Display target help with context
50## % make help
51## % make help VERBOSE=1
52## -----------------------------------------------------------------------
53help ::
54 @echo
55 @echo '[LINT: helm]'
56 @echo ' lint-chart chart_version_check.sh'
57
58 @echo ' lint-helm Syntax check helm configs'
59 @echo ' lint-helmrepo Validate index and packages'
60ifdef VERBOSE
61 @echo ' COMPARISON_BRANCH="origin/master" make lint-chart'
62endif
63
64 @echo ' lint-helm-deps Configure dependent helm charts'
65
66## -----------------------------------------------------------------------
67## Intent: Future enhancement list
68## -----------------------------------------------------------------------
69todo ::
70 @ehco "[TODO: makefiles/helm/include.mk]"
71 @echo " o Generalize script logic, remove hardcoded values,"
72 @echo " o Update gerrit/jenkins/makefiles/interactive:"
73 @echo " Lint behavior should be consistent everywhere."
74 @echo " o Fix COMPARSION_BRANCH logic:"
75 @echo " helm-repo-tools/chart_version_check contains 'opencord/master'"
76 @echo " o Refactor 2 jenkins jobs and lint-helm-deps"
77 @echo " use everywhere: % make lint-helm"
78
79# [EOF]