3 # ================================================================================
4 # Copyright (c) 2017-2022 AT&T Intellectual Property. All rights reserved.
5 # ================================================================================
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
10 # http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
23 echo "running script: [$0] for module [$1] at stage [$2]"
25 MVN_PROJECT_MODULEID="$1"
27 PROJECT_ROOT=$(dirname $0)
29 source "${PROJECT_ROOT}"/mvn-phase-lib.sh
31 TIMESTAMP=$(date +%C%y%m%dT%H%M%S)
32 export BUILD_NUMBER="${TIMESTAMP}"
37 echo "==> clean phase script"
40 rm -rf ./venv-* ./*.wgn ./site ./coverage.xml ./xunit-results.xml
43 echo "==> generate-sources phase script"
47 echo "==> compile phase script"
50 echo "==> test phase script"
51 case $MVN_PROJECT_MODULEID in
52 dcae-services-policy-sync)
55 TOXINIS=$(find . -name "tox.ini")
56 for TOXINI in "${TOXINIS[@]}"; do
57 DIR=$(echo "$TOXINI" | rev | cut -f2- -d'/' | rev)
59 rm -rf ./venv-tox ./.tox
61 source ./venv-tox/bin/activate
62 pip install pip==20.3.4
63 pip install --upgrade argparse
68 rm -rf ./venv-tox ./.tox
74 echo "==> package phase script"
77 echo "==> install phase script"
78 case $MVN_PROJECT_MODULEID in
80 upload_files_of_extension sh
85 echo "==> deploy phase script"
87 case $MVN_PROJECT_MODULEID in
88 cm-container|healthcheck-container|tls-init-container|consul-loader-container|multisite-init-container|dcae-k8s-cleanup-container|dcae-services-policy-sync)
92 echo "====> unknown mvn project module"
97 echo "==> unprocessed phase"