Joey Armstrong | 0358897 | 2022-12-07 17:30:09 -0500 | [diff] [blame] | 1 | # -*- makefile -*- |
| 2 | # ----------------------------------------------------------------------- |
Joey Armstrong | 0747509 | 2023-01-26 10:56:13 -0500 | [diff] [blame] | 3 | # Copyright 2022-2023 Open Networking Foundation (ONF) and the ONF Contributors (ONF) and the ONF Contributors |
Joey Armstrong | 0358897 | 2022-12-07 17:30:09 -0500 | [diff] [blame] | 4 | # |
| 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 | |
| 21 | GIT ?= /usr/bin/git |
| 22 | |
Joey Armstrong | 6fdbccf | 2023-01-25 20:20:10 -0500 | [diff] [blame] | 23 | ##--------------------## |
| 24 | ##---] INCLUDES [---## |
| 25 | ##--------------------## |
| 26 | include $(MAKEDIR)/lint/helm/tools.mk |
| 27 | include $(MAKEDIR)/lint/helm/branch-detect.mk |
| 28 | include $(MAKEDIR)/lint/helm/chart.mk |
| 29 | include $(MAKEDIR)/lint/helm/helm.mk |
Joey Armstrong | 748ff28 | 2023-08-07 12:27:31 -0400 | [diff] [blame] | 30 | include $(MAKEDIR)/lint/helm/helmrepo.mk |
Joey Armstrong | 0358897 | 2022-12-07 17:30:09 -0500 | [diff] [blame] | 31 | |
| 32 | ##-------------------## |
| 33 | ##---] TARGETS [---## |
| 34 | ##-------------------## |
Joey Armstrong | 0358897 | 2022-12-07 17:30:09 -0500 | [diff] [blame] | 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 | ## ----------------------------------------------------------------------- |
| 43 | lint-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 Armstrong | 0358897 | 2022-12-07 17:30:09 -0500 | [diff] [blame] | 49 | ## Intent: Display target help with context |
| 50 | ## % make help |
| 51 | ## % make help VERBOSE=1 |
| 52 | ## ----------------------------------------------------------------------- |
| 53 | help :: |
Joey Armstrong | 6fdbccf | 2023-01-25 20:20:10 -0500 | [diff] [blame] | 54 | @echo |
| 55 | @echo '[LINT: helm]' |
| 56 | @echo " lint-chart chart_version_check.sh" |
| 57 | |
| 58 | @echo " lint-helm Syntax check helm configs" |
Joey Armstrong | 0358897 | 2022-12-07 17:30:09 -0500 | [diff] [blame] | 59 | ifdef VERBOSE |
Joey Armstrong | 6fdbccf | 2023-01-25 20:20:10 -0500 | [diff] [blame] | 60 | @echo ' COMPARISON_BRANCH="origin/master" make lint-chart' |
Joey Armstrong | 0358897 | 2022-12-07 17:30:09 -0500 | [diff] [blame] | 61 | endif |
Joey Armstrong | 6fdbccf | 2023-01-25 20:20:10 -0500 | [diff] [blame] | 62 | |
| 63 | @echo " lint-helm-deps Configure dependent helm charts" |
Joey Armstrong | 0358897 | 2022-12-07 17:30:09 -0500 | [diff] [blame] | 64 | |
| 65 | ## ----------------------------------------------------------------------- |
| 66 | ## Intent: Future enhancement list |
| 67 | ## ----------------------------------------------------------------------- |
| 68 | todo :: |
| 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] |