blob: b430d483098bf91241c4e7f55d009fb31ac27882 [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 Armstrong03588972022-12-07 17:30:09 -050030
31##-------------------##
32##---] TARGETS [---##
33##-------------------##
Joey Armstrong03588972022-12-07 17:30:09 -050034
35## -----------------------------------------------------------------------
36## [TODO] Extract hardcoded values from lint.sh:
37## o pass as args
38## o pass through configs:
39## o consumer/makefile should prep then invoke htmllint:
40## + arbitrary repository commit hooks can match build behavior.
41## -----------------------------------------------------------------------
42lint-helm-deps:
43 helm repo add stable https://charts.helm.sh/stable
44 helm repo add rook-release https://charts.rook.io/release
45 helm repo add cord https://charts.opencord.org
46
47## -----------------------------------------------------------------------
Joey Armstrong03588972022-12-07 17:30:09 -050048## Intent: Display target help with context
49## % make help
50## % make help VERBOSE=1
51## -----------------------------------------------------------------------
52help ::
Joey Armstrong6fdbccf2023-01-25 20:20:10 -050053 @echo
54 @echo '[LINT: helm]'
55 @echo " lint-chart chart_version_check.sh"
56
57 @echo " lint-helm Syntax check helm configs"
Joey Armstrong03588972022-12-07 17:30:09 -050058ifdef VERBOSE
Joey Armstrong6fdbccf2023-01-25 20:20:10 -050059 @echo ' COMPARISON_BRANCH="origin/master" make lint-chart'
Joey Armstrong03588972022-12-07 17:30:09 -050060endif
Joey Armstrong6fdbccf2023-01-25 20:20:10 -050061
62 @echo " lint-helm-deps Configure dependent helm charts"
Joey Armstrong03588972022-12-07 17:30:09 -050063
64## -----------------------------------------------------------------------
65## Intent: Future enhancement list
66## -----------------------------------------------------------------------
67todo ::
68 @ehco "[TODO: makefiles/helm/include.mk]"
69 @echo " o Generalize script logic, remove hardcoded values,"
70 @echo " o Update gerrit/jenkins/makefiles/interactive:"
71 @echo " Lint behavior should be consistent everywhere."
72 @echo " o Fix COMPARSION_BRANCH logic:"
73 @echo " helm-repo-tools/chart_version_check contains 'opencord/master'"
74 @echo " o Refactor 2 jenkins jobs and lint-helm-deps"
75 @echo " use everywhere: % make lint-helm"
76
77# [EOF]