Scott Baker | 6965439 | 2021-09-17 13:50:16 -0700 | [diff] [blame^] | 1 | # SPDX-FileCopyrightText: 2020-present Open Networking Foundation <info@opennetworking.org> |
| 2 | # |
| 3 | # SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0 |
| 4 | |
| 5 | .PHONY: all test clean |
| 6 | |
| 7 | SKIPPED_DIRS=ran-simulator/files |
| 8 | |
| 9 | all: test |
| 10 | |
| 11 | jenkins-test: jenkins_version_check license_check # @HELP run the jenkins verification tests |
| 12 | docker pull quay.io/helmpack/chart-testing:v2.4.0 |
| 13 | docker run --rm --name ct --volume `pwd`:/charts quay.io/helmpack/chart-testing:v3.0.0-beta.1 sh -c "ct lint --charts charts/onos-e2sub,charts/onos-e2t,charts/ran-simulator,charts/onos-kpimon --debug --validate-maintainers=false" |
| 14 | |
| 15 | license_check: # @HELP examine and ensure license headers exist |
| 16 | @if [ ! -d "../build-tools" ]; then cd .. && git clone https://github.com/onosproject/build-tools.git; fi |
| 17 | ./../build-tools/licensing/boilerplate.py -v --rootdir=${CURDIR} --boilerplate LicenseRef-ONF-Member-1.0 --skipped-dir ${SKIPPED_DIRS} |
| 18 | |
| 19 | jenkins_version_check: build-tools # @HELP run the version checker on the charts |
| 20 | export COMPARISON_BRANCH=origin/master && export WORKSPACE=`pwd` && ./../build-tools/chart_version_check |
| 21 | ./../build-tools/chart_single_check |
| 22 | |
| 23 | version_check: build-tools # @HELP run the version checker on the charts |
| 24 | COMPARISON_BRANCH=master ./../build-tools/chart_version_check |
| 25 | ./../build-tools/chart_single_check |
| 26 | |
| 27 | test: # @HELP run the integration tests |
| 28 | test: license_check version_check deps deps-roc |
| 29 | ./build/bin/run-sd-ran-test |
| 30 | |
| 31 | publish: build-tools # @HELP publish version on sdrancharts.onosproject.org |
| 32 | ./../build-tools/publish-version ${VERSION} |
| 33 | |
| 34 | jenkins-publish: build-tools # @HELP publish version on github |
| 35 | cd .. && GO111MODULE=on go get github.com/mikefarah/yq/v4 |
| 36 | ./../build-tools/release-chart-merge-commit https://sdrancharts.onosproject.org ${WEBSITE_USER} ${WEBSITE_PASSWORD} |
| 37 | |
| 38 | build-tools: # @HELP install the ONOS build tools if needed |
| 39 | @if [ ! -d "../build-tools" ]; then cd .. && git clone https://github.com/onosproject/build-tools.git; fi |
| 40 | |
| 41 | bumponosdeps: # @HELP update "onosproject" go dependencies and push patch to git. |
| 42 | ./../build-tools/bump-onos-deps ${VERSION} |
| 43 | |
| 44 | clean-roc: # @HELP clean up temporary files for ROC umbrella. |
| 45 | rm -rf aether-roc-umbrella/charts aether-roc-umbrella/Chart.lock aether-roc-umbrella/tmpcharts |
| 46 | |
| 47 | deps-roc: # @HELP build dependencies for ROC Umbrella local charts. |
| 48 | deps-roc: clean-roc |
| 49 | helm dep build aether-roc-umbrella |
| 50 | |
| 51 | clean: # @HELP clean up temporary files for SD-RAN umbrella. |
| 52 | rm -rf sd-ran/charts sd-ran/Chart.lock |
| 53 | |
| 54 | deps: # @HELP build dependencies for SD-RAN Umbrella local charts. |
| 55 | deps: clean |
| 56 | helm dep build sd-ran |
| 57 | |
| 58 | help: |
| 59 | @grep -E '^.*: *# *@HELP' $(MAKEFILE_LIST) \ |
| 60 | | sort \ |
| 61 | | awk ' \ |
| 62 | BEGIN {FS = ": *# *@HELP"}; \ |
| 63 | {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}; \ |
| 64 | ' |