blob: 7af1d768207adb9aa8be8af5bfa46611b1dfd176 [file] [log] [blame]
Scott Baker69654392021-09-17 13:50:16 -07001# 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
7SKIPPED_DIRS=ran-simulator/files
8
9all: test
10
11jenkins-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
15license_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
19jenkins_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
23version_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
27test: # @HELP run the integration tests
28test: license_check version_check deps deps-roc
29 ./build/bin/run-sd-ran-test
30
31publish: build-tools # @HELP publish version on sdrancharts.onosproject.org
32 ./../build-tools/publish-version ${VERSION}
33
34jenkins-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
38build-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
41bumponosdeps: # @HELP update "onosproject" go dependencies and push patch to git.
42 ./../build-tools/bump-onos-deps ${VERSION}
43
44clean-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
47deps-roc: # @HELP build dependencies for ROC Umbrella local charts.
48deps-roc: clean-roc
49 helm dep build aether-roc-umbrella
50
51clean: # @HELP clean up temporary files for SD-RAN umbrella.
52 rm -rf sd-ran/charts sd-ran/Chart.lock
53
54deps: # @HELP build dependencies for SD-RAN Umbrella local charts.
55deps: clean
56 helm dep build sd-ran
57
58help:
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 '