pierventre | 2c7a4db | 2020-06-26 21:24:00 +0200 | [diff] [blame] | 1 | # |
| 2 | # Copyright 2020-present Open Networking Foundation |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
| 16 | |
| 17 | # set default shell |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 18 | SHELL := /bin/bash -e -o pipefail |
pierventre | 2c7a4db | 2020-06-26 21:24:00 +0200 | [diff] [blame] | 19 | |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 20 | # General variables |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 21 | THIS_MAKE := $(lastword $(MAKEFILE_LIST)) |
pierventre | 2c7a4db | 2020-06-26 21:24:00 +0200 | [diff] [blame] | 22 | |
| 23 | # Docker related |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 24 | DOCKER_REGISTRY ?= |
| 25 | DOCKER_REPOSITORY ?= |
| 26 | DOCKER_BUILD_ARGS ?= |
pierventre | dd90010 | 2020-11-06 19:23:41 +0100 | [diff] [blame] | 27 | DOCKER_TAG ?= stable |
| 28 | DOCKER_TAG_BUILD_DATE ?= |
pierventre | 2c7a4db | 2020-06-26 21:24:00 +0200 | [diff] [blame] | 29 | |
| 30 | # Docker labels. Only set ref and commit date if committed |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 31 | DOCKER_LABEL_VCS_URL ?= $(shell git remote get-url $(shell git remote)) |
| 32 | DOCKER_LABEL_BUILD_DATE ?= $(shell date -u "+%Y-%m-%dT%H:%M:%SZ") |
| 33 | DOCKER_LABEL_COMMIT_DATE = $(shell git show -s --format=%cd --date=iso-strict HEAD) |
pierventre | 2c7a4db | 2020-06-26 21:24:00 +0200 | [diff] [blame] | 34 | |
| 35 | ifeq ($(shell git ls-files --others --modified --exclude-standard 2>/dev/null | wc -l | sed -e 's/ //g'),0) |
| 36 | DOCKER_LABEL_VCS_REF = $(shell git rev-parse HEAD) |
| 37 | else |
| 38 | DOCKER_LABEL_VCS_REF = $(shell git rev-parse HEAD)+dirty |
| 39 | endif |
| 40 | |
pierventre | dd90010 | 2020-11-06 19:23:41 +0100 | [diff] [blame] | 41 | ifeq ($(DOCKER_TAG),stable) |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 42 | # Includes the default ("working") versions of each component |
pierventre | dd90010 | 2020-11-06 19:23:41 +0100 | [diff] [blame] | 43 | include ./Makefile.vars.stable |
| 44 | else ifeq ($(DOCKER_TAG),master) |
| 45 | # Includes the master versions of each component |
| 46 | include ./Makefile.vars.master |
| 47 | else |
| 48 | $(error You must define properly the DOCKER_TAG variable) |
| 49 | endif |
| 50 | |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 51 | |
| 52 | # Shellcheck related |
| 53 | SHELLCHECK_TAG=v0.7.1 |
| 54 | SHELLCHECK_IMAGE=koalaman/shellcheck:${SHELLCHECK_TAG} |
| 55 | |
pierventre | 1670916 | 2020-07-16 20:48:24 +0200 | [diff] [blame] | 56 | # ONOS related |
pierventre | dd90010 | 2020-11-06 19:23:41 +0100 | [diff] [blame] | 57 | ONOS_IMAGENAME := tost-onos:${DOCKER_TAG}${DOCKER_TAG_BUILD_DATE} |
pierventre | 1670916 | 2020-07-16 20:48:24 +0200 | [diff] [blame] | 58 | export ONOS_ROOT := $(shell pwd)/onos |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 59 | ONOS_REPO := https://gerrit.onosproject.org/onos |
pierventre | 1670916 | 2020-07-16 20:48:24 +0200 | [diff] [blame] | 60 | ONOS_PROFILE := "tost" |
| 61 | KARAF_VERSION := 4.2.9 |
pierventre | 2c7a4db | 2020-06-26 21:24:00 +0200 | [diff] [blame] | 62 | |
pierventre | 1670916 | 2020-07-16 20:48:24 +0200 | [diff] [blame] | 63 | # TOST related |
pierventre | dd90010 | 2020-11-06 19:23:41 +0100 | [diff] [blame] | 64 | TOST_IMAGENAME := ${DOCKER_REGISTRY}${DOCKER_REPOSITORY}tost:${DOCKER_TAG}${DOCKER_TAG_BUILD_DATE} |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 65 | export LOCAL_APPS := local-apps |
pierventre | 1670916 | 2020-07-16 20:48:24 +0200 | [diff] [blame] | 66 | |
| 67 | # Trellis-Control related |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 68 | export TRELLIS_CONTROL_ROOT := $(shell pwd)/trellis-control |
| 69 | export TRELLIS_CONTROL_REPO := https://gerrit.onosproject.org/trellis-control |
pierventre | 1670916 | 2020-07-16 20:48:24 +0200 | [diff] [blame] | 70 | |
| 71 | # Trellis-T3 related |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 72 | export TRELLIS_T3_ROOT := $(shell pwd)/trellis-t3 |
| 73 | export TRELLIS_T3_REPO := https://gerrit.onosproject.org/trellis-t3 |
pierventre | 1670916 | 2020-07-16 20:48:24 +0200 | [diff] [blame] | 74 | |
pierventre | 1670916 | 2020-07-16 20:48:24 +0200 | [diff] [blame] | 75 | # Up4 related |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 76 | export UP4_ROOT := $(shell pwd)/up4 |
pierventre | 0b6a9c3 | 2020-10-02 11:32:54 +0200 | [diff] [blame] | 77 | export UP4_REPO := git@github.com:omec-project/up4.git |
pierventre | 1670916 | 2020-07-16 20:48:24 +0200 | [diff] [blame] | 78 | |
pierventre | f33fc11 | 2020-07-30 12:55:54 +0200 | [diff] [blame] | 79 | # Fabric-TNA related |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 80 | export FABRIC_TNA_ROOT := $(shell pwd)/fabric-tna |
pierventre | 0b6a9c3 | 2020-10-02 11:32:54 +0200 | [diff] [blame] | 81 | export FABRIC_TNA_REPO := git@github.com:stratum/fabric-tna.git |
pierventre | f33fc11 | 2020-07-30 12:55:54 +0200 | [diff] [blame] | 82 | |
pierventre | 8bd6350 | 2021-04-12 12:34:23 +0200 | [diff] [blame^] | 83 | .PHONY: onos trellis-control trellis-t3 up4 fabric-tna |
pierventre | 1670916 | 2020-07-16 20:48:24 +0200 | [diff] [blame] | 84 | |
pierventre | f33fc11 | 2020-07-30 12:55:54 +0200 | [diff] [blame] | 85 | .SILENT: up4 fabric-tna |
pierventre | 2c7a4db | 2020-06-26 21:24:00 +0200 | [diff] [blame] | 86 | |
| 87 | # This should to be the first and default target in this Makefile |
| 88 | help: ## : Print this help |
| 89 | @echo "Usage: make [<target>]" |
| 90 | @echo "where available targets are:" |
| 91 | @echo |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 92 | @grep '^[[:alnum:]_-]*:.* ##' $(THIS_MAKE) \ |
pierventre | 2c7a4db | 2020-06-26 21:24:00 +0200 | [diff] [blame] | 93 | | sort | awk 'BEGIN {FS=":.* ## "}; {printf "%-25s %s\n", $$1, $$2};' |
| 94 | @echo |
| 95 | @echo "Environment variables:" |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 96 | @echo "ONOS_VERSION : Override to use a specific branch/commit/tag/release to build the image" |
| 97 | @echo "TRELLIS_CONTROL_VERSION : Override to use a specific branch/commit/tag/release to build the image" |
| 98 | @echo "TRELLIS_T3_VERSION : Override to use a specific branch/commit/tag/release to build the image" |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 99 | @echo "UP4_VERSION : Override to use a specific branch/commit/tag/release to build the image" |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 100 | @echo "FABRIC_TNA_VERSION : Override to use a specific branch/commit/tag/release to build the image" |
pierventre | 2c7a4db | 2020-06-26 21:24:00 +0200 | [diff] [blame] | 101 | @echo "" |
pierventre | dd90010 | 2020-11-06 19:23:41 +0100 | [diff] [blame] | 102 | @echo "'Makefile.vars.stable' defines the stable values for '*_VERSION' variables". |
| 103 | @echo "'Makefile.vars.master' defines the tip values for '*_VERSION' variables". |
pierventre | f33fc11 | 2020-07-30 12:55:54 +0200 | [diff] [blame] | 104 | @echo "" |
pierventre | 2c7a4db | 2020-06-26 21:24:00 +0200 | [diff] [blame] | 105 | |
| 106 | ## Make targets |
| 107 | |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 108 | check-scripts: ## : Provides warnings and suggestions for bash/sh shell scripts |
| 109 | # Fail if any of these files have warnings, exclude sed replacement warnings |
| 110 | docker run --rm -v "${PWD}:/mnt" ${SHELLCHECK_IMAGE} *.sh -e SC2001 |
| 111 | |
pierventre | 1670916 | 2020-07-16 20:48:24 +0200 | [diff] [blame] | 112 | mvn_settings.xml: mvn_settings.sh ## : Builds mvn_settings file for proxy |
| 113 | @./$< |
| 114 | |
| 115 | local-apps: ## : Creates the folder that will host the oar file |
| 116 | mkdir -p ${LOCAL_APPS}/ |
| 117 | |
| 118 | trellis-control: ## : Checkout trellis-control code |
| 119 | # Clones trellis-control if it does not exist |
| 120 | if [ ! -d "trellis-control" ]; then \ |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 121 | git clone ${TRELLIS_CONTROL_REPO}; \ |
pierventre | 1670916 | 2020-07-16 20:48:24 +0200 | [diff] [blame] | 122 | fi |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 123 | |
| 124 | # Pending changes - do not proceed |
| 125 | @modified=$$(cd ${TRELLIS_CONTROL_ROOT} && git status --porcelain); \ |
| 126 | if [ ! -z "$${modified}" ]; then \ |
| 127 | echo "Unable to checkout, you have pending changes in trellis-control repository"; \ |
| 128 | exit 1; \ |
| 129 | fi |
| 130 | |
pierventre | 3b5f9f1 | 2020-10-22 16:24:34 +0200 | [diff] [blame] | 131 | # Updates the repo and avoids any stale branches |
| 132 | cd ${TRELLIS_CONTROL_ROOT} && git remote update |
| 133 | |
pierventre | 0b6a9c3 | 2020-10-02 11:32:54 +0200 | [diff] [blame] | 134 | # Try the git checkout first otherwise we download the review |
pierventre | 3b5f9f1 | 2020-10-22 16:24:34 +0200 | [diff] [blame] | 135 | if ! (cd ${TRELLIS_CONTROL_ROOT} && (git checkout origin/${TRELLIS_CONTROL_VERSION} || git checkout ${TRELLIS_CONTROL_VERSION})); then \ |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 136 | if ! (cd ${TRELLIS_CONTROL_ROOT} && git fetch ${TRELLIS_CONTROL_REPO} ${TRELLIS_CONTROL_VERSION} && git checkout FETCH_HEAD); then \ |
| 137 | echo "Unable to fetch the changes from the trellis-control repository"; \ |
| 138 | fi \ |
| 139 | fi |
pierventre | 1670916 | 2020-07-16 20:48:24 +0200 | [diff] [blame] | 140 | |
| 141 | trellis-control-build: mvn_settings.xml local-apps trellis-control ## : Builds trellis-control using local app or mvn |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 142 | @./app-build.sh $@ |
| 143 | |
pierventre | 1670916 | 2020-07-16 20:48:24 +0200 | [diff] [blame] | 144 | trellis-t3: ## : Checkout trellis-t3 code |
| 145 | if [ ! -d "trellis-t3" ]; then \ |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 146 | git clone ${TRELLIS_T3_REPO}; \ |
pierventre | 1670916 | 2020-07-16 20:48:24 +0200 | [diff] [blame] | 147 | fi |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 148 | |
| 149 | @modified=$$(cd ${TRELLIS_T3_ROOT} && git status --porcelain); \ |
| 150 | if [ ! -z "$${modified}" ]; then \ |
| 151 | echo "Unable to checkout, you have pending changes in trellis-t3 repository"; \ |
| 152 | exit 1; \ |
| 153 | fi |
| 154 | |
pierventre | 3b5f9f1 | 2020-10-22 16:24:34 +0200 | [diff] [blame] | 155 | cd ${TRELLIS_T3_ROOT} && git remote update |
| 156 | |
| 157 | if ! (cd ${TRELLIS_T3_ROOT} && (git checkout origin/${TRELLIS_T3_VERSION} || git checkout ${TRELLIS_T3_VERSION})); then \ |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 158 | if ! (cd ${TRELLIS_T3_ROOT} && git fetch ${TRELLIS_T3_REPO} ${TRELLIS_T3_VERSION} && git checkout FETCH_HEAD); then \ |
| 159 | echo "Unable to fetch the changes from the trellis-t3 repository"; \ |
| 160 | fi \ |
| 161 | fi |
pierventre | 1670916 | 2020-07-16 20:48:24 +0200 | [diff] [blame] | 162 | |
| 163 | trellis-t3-build: mvn_settings.xml local-apps trellis-t3 ## : Builds trellis-t3 using local app or mvn |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 164 | @./app-build.sh $@ |
| 165 | |
pierventre | 1670916 | 2020-07-16 20:48:24 +0200 | [diff] [blame] | 166 | up4: ## : Checkout up4 code |
| 167 | if [ ! -d "up4" ]; then \ |
| 168 | git clone ${UP4_REPO}; \ |
| 169 | fi |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 170 | |
| 171 | @modified=$$(cd ${UP4_ROOT} && git status --porcelain); \ |
| 172 | if [ ! -z "$${modified}" ]; then \ |
| 173 | echo "Unable to checkout, you have pending changes in up4 repository"; \ |
| 174 | exit 1; \ |
| 175 | fi |
| 176 | |
pierventre | 3b5f9f1 | 2020-10-22 16:24:34 +0200 | [diff] [blame] | 177 | cd ${UP4_ROOT} && git remote update |
| 178 | |
| 179 | if ! (cd ${UP4_ROOT} && (git checkout origin/${UP4_VERSION} || git checkout ${UP4_VERSION})); then \ |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 180 | if ! (cd ${UP4_ROOT} && git fetch ${UP4_REPO} ${UP4_VERSION} && git checkout FETCH_HEAD); then \ |
| 181 | echo "Unable to fetch the changes from the up4 repository"; \ |
| 182 | exit 1; \ |
| 183 | fi \ |
| 184 | fi |
pierventre | 1670916 | 2020-07-16 20:48:24 +0200 | [diff] [blame] | 185 | |
pierventre | f33fc11 | 2020-07-30 12:55:54 +0200 | [diff] [blame] | 186 | up4-build: mvn_settings.xml local-apps up4 ## : Builds up4 using local app |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 187 | @./app-build.sh $@ |
| 188 | |
pierventre | f33fc11 | 2020-07-30 12:55:54 +0200 | [diff] [blame] | 189 | fabric-tna: ## : Checkout fabric-tna code |
| 190 | if [ ! -d "fabric-tna" ]; then \ |
| 191 | git clone ${FABRIC_TNA_REPO}; \ |
| 192 | fi |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 193 | |
| 194 | @modified=$$(cd ${FABRIC_TNA_ROOT} && git status --porcelain); \ |
| 195 | if [ ! -z "$${modified}" ]; then \ |
| 196 | echo "Unable to checkout, you have pending changes in fabric-tna repository"; \ |
| 197 | exit 1; \ |
| 198 | fi |
| 199 | |
pierventre | 3b5f9f1 | 2020-10-22 16:24:34 +0200 | [diff] [blame] | 200 | cd ${FABRIC_TNA_ROOT} && git remote update |
| 201 | |
| 202 | if ! (cd ${FABRIC_TNA_ROOT} && (git checkout origin/${FABRIC_TNA_VERSION} || git checkout ${FABRIC_TNA_VERSION})); then \ |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 203 | if ! (cd ${FABRIC_TNA_ROOT} && git fetch ${FABRIC_TNA_REPO} ${FABRIC_TNA_VERSION} && git checkout FETCH_HEAD); then \ |
| 204 | echo "Unable to fetch the changes from the fabric-tna repository"; \ |
| 205 | exit 1; \ |
| 206 | fi \ |
| 207 | fi |
pierventre | f33fc11 | 2020-07-30 12:55:54 +0200 | [diff] [blame] | 208 | |
| 209 | fabric-tna-build: mvn_settings.xml local-apps fabric-tna ## : Builds fabric-tna using local app |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 210 | @./app-build.sh $@ |
| 211 | |
pierventre | 8bd6350 | 2021-04-12 12:34:23 +0200 | [diff] [blame^] | 212 | apps: trellis-control trellis-t3 up4 fabric-tna ## : downloads commits, files, and refs from remotes |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 213 | |
pierventre | 8bd6350 | 2021-04-12 12:34:23 +0200 | [diff] [blame^] | 214 | apps-build: trellis-control-build trellis-t3-build up4-build fabric-tna-build ## : Build the onos apps |
pierventre | f33fc11 | 2020-07-30 12:55:54 +0200 | [diff] [blame] | 215 | |
pierventre | 2c7a4db | 2020-06-26 21:24:00 +0200 | [diff] [blame] | 216 | onos: ## : Checkout onos code |
pierventre | 2c7a4db | 2020-06-26 21:24:00 +0200 | [diff] [blame] | 217 | if [ ! -d "onos" ]; then \ |
| 218 | git clone https://gerrit.onosproject.org/onos; \ |
| 219 | fi |
pierventre | 2c7a4db | 2020-06-26 21:24:00 +0200 | [diff] [blame] | 220 | |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 221 | @modified=$$(cd ${ONOS_ROOT} && git status --porcelain); \ |
| 222 | if [ ! -z "$${modified}" ]; then \ |
| 223 | echo "Unable to checkout, you have pending changes in onos repository"; \ |
| 224 | exit 1; \ |
| 225 | fi |
| 226 | |
pierventre | 3b5f9f1 | 2020-10-22 16:24:34 +0200 | [diff] [blame] | 227 | cd ${ONOS_ROOT} && git remote update |
| 228 | |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 229 | # In case of failure, we do not proceed because we cannot build with mvn |
pierventre | 3b5f9f1 | 2020-10-22 16:24:34 +0200 | [diff] [blame] | 230 | if ! (cd ${ONOS_ROOT} && (git checkout origin/${ONOS_VERSION} || git checkout ${ONOS_VERSION})); then \ |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 231 | if ! (cd ${ONOS_ROOT} && git fetch ${ONOS_REPO} ${ONOS_VERSION} && git checkout FETCH_HEAD); then \ |
| 232 | echo "Unable to fetch the changes from the onos repository"; \ |
| 233 | exit 1; \ |
| 234 | fi \ |
| 235 | fi |
pierventre | d9cb729 | 2020-07-31 00:01:47 +0200 | [diff] [blame] | 236 | |
pierventre | f03097a | 2020-07-15 18:49:05 +0200 | [diff] [blame] | 237 | onos-build: onos ## : Builds the tost-onos docker image |
pierventre | 2c7a4db | 2020-06-26 21:24:00 +0200 | [diff] [blame] | 238 | # Set some env variables |
| 239 | cd ${ONOS_ROOT} && \ |
| 240 | . tools/build/envDefaults && \ |
| 241 | docker build . -t ${ONOS_IMAGENAME} \ |
| 242 | --build-arg PROFILE=${ONOS_PROFILE} |
| 243 | |
pierventre | 1670916 | 2020-07-16 20:48:24 +0200 | [diff] [blame] | 244 | tost-build: ## : Builds the tost docker image |
| 245 | docker build $(DOCKER_BUILD_ARGS) \ |
| 246 | -t ${TOST_IMAGENAME} \ |
pierventre | dd90010 | 2020-11-06 19:23:41 +0100 | [diff] [blame] | 247 | --build-arg DOCKER_TAG="${DOCKER_TAG}${DOCKER_TAG_BUILD_DATE}" \ |
pierventre | 1670916 | 2020-07-16 20:48:24 +0200 | [diff] [blame] | 248 | --build-arg LOCAL_APPS=${LOCAL_APPS} \ |
| 249 | --build-arg KARAF_VERSION=${KARAF_VERSION} \ |
pierventre | dd90010 | 2020-11-06 19:23:41 +0100 | [diff] [blame] | 250 | --build-arg org_label_schema_version="${DOCKER_TAG}${DOCKER_TAG_BUILD_DATE}" \ |
pierventre | 1670916 | 2020-07-16 20:48:24 +0200 | [diff] [blame] | 251 | --build-arg org_label_schema_vcs_url="${DOCKER_LABEL_VCS_URL}" \ |
| 252 | --build-arg org_label_schema_vcs_ref="${DOCKER_LABEL_VCS_REF}" \ |
| 253 | --build-arg org_label_schema_build_date="${DOCKER_LABEL_BUILD_DATE}" \ |
pierventre | dd90010 | 2020-11-06 19:23:41 +0100 | [diff] [blame] | 254 | --build-arg org_onosproject_onos_version="$(shell cd ${ONOS_ROOT} && git rev-parse HEAD)"\ |
| 255 | --build-arg org_onosproject_trellis_control_version="$(shell cd ${TRELLIS_CONTROL_ROOT} && git rev-parse HEAD)"\ |
| 256 | --build-arg org_onosproject_trellis_t3_version="$(shell cd ${TRELLIS_T3_ROOT} && git rev-parse HEAD)"\ |
pierventre | dd90010 | 2020-11-06 19:23:41 +0100 | [diff] [blame] | 257 | --build-arg org_omecproject_up4_version="$(shell cd ${UP4_ROOT} && git rev-parse HEAD)"\ |
pierventre | dd90010 | 2020-11-06 19:23:41 +0100 | [diff] [blame] | 258 | --build-arg org_stratumproject_fabric_tna_version="$(shell cd ${FABRIC_TNA_ROOT} && git rev-parse HEAD)"\ |
pierventre | 1670916 | 2020-07-16 20:48:24 +0200 | [diff] [blame] | 259 | -f Dockerfile.tost . |
| 260 | |
pierventre | f03097a | 2020-07-15 18:49:05 +0200 | [diff] [blame] | 261 | onos-push: ## : Pushes the tost-onos docker image to an external repository |
pierventre | 2c7a4db | 2020-06-26 21:24:00 +0200 | [diff] [blame] | 262 | docker push ${ONOS_IMAGENAME} |
| 263 | |
pierventre | 1670916 | 2020-07-16 20:48:24 +0200 | [diff] [blame] | 264 | tost-push: ## : Pushes the tost docker image to an external repository |
| 265 | docker push ${TOST_IMAGENAME} |
pierventre | 2c7a4db | 2020-06-26 21:24:00 +0200 | [diff] [blame] | 266 | |
pierventre | f03097a | 2020-07-15 18:49:05 +0200 | [diff] [blame] | 267 | # Used for CI job |
pierventre | 8361142 | 2020-08-14 22:53:15 +0200 | [diff] [blame] | 268 | docker-build: check-scripts onos-build apps-build tost-build ## : Builds the tost image |
pierventre | 2c7a4db | 2020-06-26 21:24:00 +0200 | [diff] [blame] | 269 | |
pierventre | f03097a | 2020-07-15 18:49:05 +0200 | [diff] [blame] | 270 | # User for CD job |
pierventre | 1670916 | 2020-07-16 20:48:24 +0200 | [diff] [blame] | 271 | docker-push: tost-push ## : Pushes the tost image |
pierventre | f03097a | 2020-07-15 18:49:05 +0200 | [diff] [blame] | 272 | |
pierventre | 1670916 | 2020-07-16 20:48:24 +0200 | [diff] [blame] | 273 | clean: ## : Deletes any locally copied files or artifacts |
| 274 | rm -rf ${ONOS_ROOT} |
| 275 | rm -rf ${TRELLIS_CONTROL_ROOT} |
| 276 | rm -rf ${TRELLIS_T3_ROOT} |
pierventre | 1670916 | 2020-07-16 20:48:24 +0200 | [diff] [blame] | 277 | rm -rf ${UP4_ROOT} |
pierventre | f33fc11 | 2020-07-30 12:55:54 +0200 | [diff] [blame] | 278 | rm -rf ${FABRIC_TNA_ROOT} |
pierventre | 1670916 | 2020-07-16 20:48:24 +0200 | [diff] [blame] | 279 | rm -rf ${LOCAL_APPS} |
| 280 | rm -rf .m2 |
| 281 | rm -rf mvn_settings.xml |
pierventre | 2c7a4db | 2020-06-26 21:24:00 +0200 | [diff] [blame] | 282 | |
| 283 | # end file |