Joey Armstrong | c02931b | 2022-11-17 16:13:20 -0500 | [diff] [blame] | 1 | # -*- makefile -*- |
| 2 | # ----------------------------------------------------------------------- |
Joey Armstrong | 34d4ad7 | 2023-01-03 09:47:15 -0500 | [diff] [blame] | 3 | # Copyright 2021-2023 Open Networking Foundation (ONF) and the ONF Contributors |
Matteo Scandolo | 7414cff | 2021-07-23 08:48:54 -0700 | [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. |
Joey Armstrong | c02931b | 2022-11-17 16:13:20 -0500 | [diff] [blame] | 16 | # ----------------------------------------------------------------------- |
Matteo Scandolo | 7414cff | 2021-07-23 08:48:54 -0700 | [diff] [blame] | 17 | |
Joey Armstrong | c02931b | 2022-11-17 16:13:20 -0500 | [diff] [blame] | 18 | .DEFAULT_GOAL := help |
Matteo Scandolo | 7414cff | 2021-07-23 08:48:54 -0700 | [diff] [blame] | 19 | |
Joey Armstrong | c02931b | 2022-11-17 16:13:20 -0500 | [diff] [blame] | 20 | ##-------------------## |
| 21 | ##---] GLOBALS [---## |
| 22 | ##-------------------## |
| 23 | dot ?= . |
| 24 | TOP ?= $(dot) |
| 25 | MAKEDIR ?= $(TOP)/makefiles |
| 26 | |
| 27 | ##--------------------## |
| 28 | ##---] INCLUDES [---## |
| 29 | ##--------------------## |
| 30 | include $(MAKEDIR)/include.mk |
| 31 | |
| 32 | branch=`cat .gitreview | grep branch | cut -d '=' -f2` |
| 33 | |
Joey Armstrong | 0358897 | 2022-12-07 17:30:09 -0500 | [diff] [blame] | 34 | ## ----------------------------------------------------------------------- |
| 35 | ## ----------------------------------------------------------------------- |
Joey Armstrong | c02931b | 2022-11-17 16:13:20 -0500 | [diff] [blame] | 36 | help:: # @HELP Print the command options |
| 37 | @echo " test Sanity check chart versions" |
| 38 | @echo |
| 39 | @echo "[CHECK: release]" |
Joey Armstrong | c02931b | 2022-11-17 16:13:20 -0500 | [diff] [blame] | 40 | @echo " tagcollisionreject.sh 404 - raw.github source MIA" |
Matteo Scandolo | 7414cff | 2021-07-23 08:48:54 -0700 | [diff] [blame] | 41 | @echo |
| 42 | @echo "\033[0;31m VOLTHA HELM CHARTS \033[0m" |
| 43 | @echo |
| 44 | @grep -E '^.*: .* *# *@HELP' $(MAKEFILE_LIST) \ |
| 45 | | sort \ |
| 46 | | awk ' \ |
| 47 | BEGIN {FS = ": .* *# *@HELP"}; \ |
| 48 | {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}; \ |
| 49 | ' |
| 50 | |
Joey Armstrong | c02931b | 2022-11-17 16:13:20 -0500 | [diff] [blame] | 51 | # ----------------------------------------------------------------------- |
| 52 | # curl: 404: Not Found |
| 53 | # https://raw.githubusercontent.com |
| 54 | # ----------------------------------------------------------------------- |
| 55 | # github no longer supports usercontent retrieval, svc was used as a CDN. |
| 56 | # 3 distinct versions of tcr.sh are used by jenkins jobs. |
| 57 | # ----------------------------------------------------------------------- |
| 58 | # Short term answer: |
| 59 | # o Find something usable for interactive use. |
| 60 | # Long term answer: |
| 61 | # o Refactor tcr.sh x [n] and support consistent functionality with a single script. |
| 62 | # ----------------------------------------------------------------------- |
Matteo Scandolo | 7414cff | 2021-07-23 08:48:54 -0700 | [diff] [blame] | 63 | tagcollisionreject.sh: |
| 64 | @curl -o tagcollisionreject.tmp.sh https://raw.githubusercontent.com/opencord/ci-management/master/jjb/shell/tagcollisionreject.sh |
| 65 | @echo 6dc8352d47f415e003dbddc30ede194ca304907d25f1c2a384f928083194860f tagcollisionreject.tmp.sh | sha256sum --check |
| 66 | @mv tagcollisionreject.tmp.sh tagcollisionreject.sh |
| 67 | |
| 68 | test-tags: tagcollisionreject.sh |
| 69 | @bash ./tagcollisionreject.sh |
| 70 | |
Joey Armstrong | 0358897 | 2022-12-07 17:30:09 -0500 | [diff] [blame] | 71 | ## ----------------------------------------------------------------------- |
| 72 | ## [NOTE] moving to makefiles/lint/helm/include.mk |
| 73 | ## ----------------------------------------------------------------------- |
Matteo Scandolo | 7414cff | 2021-07-23 08:48:54 -0700 | [diff] [blame] | 74 | helm-repo-tools: |
| 75 | git clone "https://gerrit.opencord.org/helm-repo-tools" |
| 76 | |
Joey Armstrong | 34d4ad7 | 2023-01-03 09:47:15 -0500 | [diff] [blame] | 77 | lint-local: lint-helm lint-chart |
| 78 | |
Joey Armstrong | 6fdbccf | 2023-01-25 20:20:10 -0500 | [diff] [blame] | 79 | # lint-helm: |
| 80 | # helm-repo-tools/helmlint.sh |
Joey Armstrong | 34d4ad7 | 2023-01-03 09:47:15 -0500 | [diff] [blame] | 81 | |
Joey Armstrong | 6fdbccf | 2023-01-25 20:20:10 -0500 | [diff] [blame] | 82 | # lint-chart: |
| 83 | # COMPARISON_BRANCH=origin/master helm-repo-tools/chart_version_check.sh |
Joey Armstrong | 34d4ad7 | 2023-01-03 09:47:15 -0500 | [diff] [blame] | 84 | |
Joey Armstrong | 0358897 | 2022-12-07 17:30:09 -0500 | [diff] [blame] | 85 | ## ----------------------------------------------------------------------- |
| 86 | ## ----------------------------------------------------------------------- |
| 87 | # test-all += test-tags # tagcollisionreject + curl is broken |
| 88 | test-all += helm-repo-tools |
| 89 | test: $(test-all) # @HELP Makes sure the versions used in the charts are valid |
Matteo Scandolo | 7414cff | 2021-07-23 08:48:54 -0700 | [diff] [blame] | 90 | @COMPARISON_BRANCH=origin/$(branch) ./helm-repo-tools/chart_version_check.sh |
| 91 | |
Joey Armstrong | 0358897 | 2022-12-07 17:30:09 -0500 | [diff] [blame] | 92 | ## ----------------------------------------------------------------------- |
| 93 | ## ----------------------------------------------------------------------- |
Joey Armstrong | ae55f95 | 2022-11-29 16:20:27 -0500 | [diff] [blame] | 94 | clean :: # @HELP Removes all files downloaded to run the tests |
Joey Armstrong | ebc25f8 | 2022-11-04 15:10:51 -0400 | [diff] [blame] | 95 | $(RM) -r helm-repo-tools |
| 96 | $(RM) tagcollisionreject.* |
Joey Armstrong | c02931b | 2022-11-17 16:13:20 -0500 | [diff] [blame] | 97 | |
| 98 | # [EOF] |