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 | 0358897 | 2022-12-07 17:30:09 -0500 | [diff] [blame] | 30 | |
| 31 | ##-------------------## |
| 32 | ##---] TARGETS [---## |
| 33 | ##-------------------## |
Joey Armstrong | 0358897 | 2022-12-07 17:30:09 -0500 | [diff] [blame] | 34 | |
| 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 | ## ----------------------------------------------------------------------- |
| 42 | lint-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 Armstrong | 0358897 | 2022-12-07 17:30:09 -0500 | [diff] [blame] | 48 | ## Intent: Display target help with context |
| 49 | ## % make help |
| 50 | ## % make help VERBOSE=1 |
| 51 | ## ----------------------------------------------------------------------- |
| 52 | help :: |
Joey Armstrong | 6fdbccf | 2023-01-25 20:20:10 -0500 | [diff] [blame] | 53 | @echo |
| 54 | @echo '[LINT: helm]' |
| 55 | @echo " lint-chart chart_version_check.sh" |
| 56 | |
| 57 | @echo " lint-helm Syntax check helm configs" |
Joey Armstrong | 0358897 | 2022-12-07 17:30:09 -0500 | [diff] [blame] | 58 | ifdef VERBOSE |
Joey Armstrong | 6fdbccf | 2023-01-25 20:20:10 -0500 | [diff] [blame] | 59 | @echo ' COMPARISON_BRANCH="origin/master" make lint-chart' |
Joey Armstrong | 0358897 | 2022-12-07 17:30:09 -0500 | [diff] [blame] | 60 | endif |
Joey Armstrong | 6fdbccf | 2023-01-25 20:20:10 -0500 | [diff] [blame] | 61 | |
| 62 | @echo " lint-helm-deps Configure dependent helm charts" |
Joey Armstrong | 0358897 | 2022-12-07 17:30:09 -0500 | [diff] [blame] | 63 | |
| 64 | ## ----------------------------------------------------------------------- |
| 65 | ## Intent: Future enhancement list |
| 66 | ## ----------------------------------------------------------------------- |
| 67 | todo :: |
| 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] |