blob: 9599487fd86efe5d41aa2de6557bfa979d1f0b43 [file] [log] [blame]
Ladue, David (dl3158)64292312017-08-23 11:27:58 -04001#!/bin/bash
2
Lusheng Ji7bb22602017-09-11 22:52:13 +00003# ================================================================================
vv770d5116f872022-04-25 21:14:50 +00004# Copyright (c) 2017-2022 AT&T Intellectual Property. All rights reserved.
Lusheng Ji7bb22602017-09-11 22:52:13 +00005# ================================================================================
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17# ============LICENSE_END=========================================================
18#
19# ECOMP is a trademark and service mark of AT&T Intellectual Property.
20
21set -ex
22
23
Ladue, David (dl3158)64292312017-08-23 11:27:58 -040024echo "running script: [$0] for module [$1] at stage [$2]"
25
Lusheng Ji7bb22602017-09-11 22:52:13 +000026MVN_PROJECT_MODULEID="$1"
27MVN_PHASE="$2"
Lusheng Ji1ee28592018-03-28 02:39:54 -040028PROJECT_ROOT=$(dirname $0)
Ladue, David (dl3158)64292312017-08-23 11:27:58 -040029
vv770d5116f872022-04-25 21:14:50 +000030source "${PROJECT_ROOT}"/mvn-phase-lib.sh
Lusheng Ji7bb22602017-09-11 22:52:13 +000031
32# Customize the section below for each project
Ladue, David (dl3158)64292312017-08-23 11:27:58 -040033case $MVN_PHASE in
34clean)
35 echo "==> clean phase script"
Lusheng Ji7bb22602017-09-11 22:52:13 +000036 clean_templated_files
37 clean_tox_files
38 rm -rf ./venv-* ./*.wgn
Ladue, David (dl3158)64292312017-08-23 11:27:58 -040039 ;;
40generate-sources)
41 echo "==> generate-sources phase script"
Lusheng Ji7bb22602017-09-11 22:52:13 +000042 expand_templates
Ladue, David (dl3158)64292312017-08-23 11:27:58 -040043 ;;
44compile)
45 echo "==> compile phase script"
46 ;;
47test)
48 echo "==> test phase script"
Lusheng Ji1ee28592018-03-28 02:39:54 -040049 run_tox_test
Ladue, David (dl3158)64292312017-08-23 11:27:58 -040050 ;;
51package)
52 echo "==> package phase script"
53 ;;
54install)
55 echo "==> install phase script"
56 ;;
57deploy)
58 echo "==> deploy phase script"
Lusheng Ji7bb22602017-09-11 22:52:13 +000059
60 # below segments are example of how to deploy various artifacts
61 # copy the ones suitable for your repo, and remove the "if false" statement
62
63 # build docker image from Docker file (under root of repo) and push to registry
Lusheng Ji7bb22602017-09-11 22:52:13 +000064 build_and_push_docker
Lusheng Ji7bb22602017-09-11 22:52:13 +000065
66 # upload all yaml file under the root of repo
Ladue, David (dl3158)64292312017-08-23 11:27:58 -040067 ;;
68*)
69 echo "==> unprocessed phase"
70 ;;
71esac
Lusheng Ji7bb22602017-09-11 22:52:13 +000072