Joey Armstrong | f128de8 | 2023-09-08 17:05:18 -0400 | [diff] [blame] | 1 | # -*- makefile -*- |
| 2 | # ----------------------------------------------------------------------- |
Joey Armstrong | dc04c93 | 2024-04-01 12:14:21 -0400 | [diff] [blame] | 3 | # Copyright 2017-2024 Open Networking Foundation Contributors |
Joey Armstrong | f128de8 | 2023-09-08 17:05:18 -0400 | [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 | # |
Joey Armstrong | dc04c93 | 2024-04-01 12:14:21 -0400 | [diff] [blame] | 9 | # http:#www.apache.org/licenses/LICENSE-2.0 |
Joey Armstrong | f128de8 | 2023-09-08 17:05:18 -0400 | [diff] [blame] | 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 | # ----------------------------------------------------------------------- |
Joey Armstrong | dc04c93 | 2024-04-01 12:14:21 -0400 | [diff] [blame] | 17 | # SPDX-FileCopyrightText: 2017-2024 Open Networking Foundation Contributors |
| 18 | # SPDX-License-Identifier: Apache-2.0 |
| 19 | # ----------------------------------------------------------------------- |
Joey Armstrong | f128de8 | 2023-09-08 17:05:18 -0400 | [diff] [blame] | 20 | # Intent: Helper makefile target used to setup for a release |
| 21 | # ----------------------------------------------------------------------- |
| 22 | |
| 23 | $(if $(DEBUG),$(warning ENTER)) |
| 24 | |
| 25 | ##-------------------## |
| 26 | ##---] GLOBALS [---## |
| 27 | ##-------------------## |
| 28 | |
| 29 | # TODO: Library function $(call mk-path,makefiles/release/targets.mk) |
| 30 | release-mk-top := $(abspath $(lastword $(MAKEFILE_LIST))) |
| 31 | release-mk-top := $(subst /makefiles/release/targets.mk,$(null),$(release-mk-top)) |
| 32 | |
| 33 | GIT ?= /usr/bin/env git |
| 34 | |
| 35 | ##--------------------## |
| 36 | ##---] INCLUDES [---## |
| 37 | ##--------------------## |
| 38 | include $(ONF_MAKEDIR)/release/voltha-versions.mk |
| 39 | include $(ONF_MAKEDIR)/release/targets/voltha-certification.mk |
| 40 | include $(ONF_MAKEDIR)/release/targets/voltha-e2e.mk |
| 41 | include $(ONF_MAKEDIR)/release/targets/voltha-nightly-jobs.mk |
| 42 | |
| 43 | # last-release := voltha-2.11 |
| 44 | last-release := $(voltha-release-last) |
| 45 | |
| 46 | |
| 47 | ##-------------------## |
| 48 | ##---] TARGETS [---## |
| 49 | ##-------------------## |
| 50 | all: help |
| 51 | |
| 52 | ## --------------------------------------------------------------------------- |
| 53 | ## Intent: Build these deps to create a new branch/release area |
| 54 | ## --------------------------------------------------------------------------- |
| 55 | create-jobs-release += create-jobs-release-bat |
| 56 | create-jobs-release += create-jobs-release-certification |
| 57 | create-jobs-release += create-jobs-release-nightly |
| 58 | create-jobs-release += create-jobs-release-units |
| 59 | create-jobs-release += create-jobs-release-e2e |
| 60 | |
| 61 | create-jobs-release : $(create-jobs-release) |
| 62 | |
| 63 | @echo |
| 64 | $(GIT) status |
| 65 | |
| 66 | ## --------------------------------------------------------------------------- |
| 67 | ## Intent: Create branch driven pipeline test jobs. |
| 68 | ## --------------------------------------------------------------------------- |
| 69 | units-yaml := $(release-mk-top)/jjb/pipeline/voltha/$(voltha-version) |
| 70 | units-root := $(subst /$(voltha-version),$(null),$(units-yaml)) |
| 71 | create-jobs-release-units : $(units-yaml) |
| 72 | $(units-yaml): |
| 73 | |
| 74 | @echo |
| 75 | @echo "** Create branch driven pipeline: unit tests" |
| 76 | $(HIDE)mkdir -vp $@ |
| 77 | rsync -r --checksum $(units-root)/master/. $@/. |
| 78 | $(HIDE)/bin/ls -l $(units-root) |
| 79 | |
| 80 | ## --------------------------------------------------------------------------- |
| 81 | ## Intent: Create branch driven nightly test jobs. |
| 82 | ## --------------------------------------------------------------------------- |
| 83 | sterile-create-jobs-release := $(addprefix sterile-,$(create-jobs-release)) |
| 84 | sterile-create-jobs-release : $(sterile-create-jobs-release) |
| 85 | $(RM) -r $(units-yaml) |
| 86 | |
| 87 | $(if $(DEBUG),$(warning LEAVE)) |
| 88 | |
| 89 | # [EOF] |