3 # ================================================================================
4 # Copyright (c) 2017-2018 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)
30 echo "MVN_RELEASE_TAG is set to [$MVN_RELEASE_TAG]"
31 RELEASE_TAG=${MVN_RELEASE_TAG:-R8}
32 if [ "$RELEASE_TAG" != "R1" ]; then
33 RELEASE_TAGGED_DIR="${RELEASE_TAG}/"
37 if ! wget -O ${PROJECT_ROOT}/mvn-phase-lib.sh \
38 "$MVN_RAWREPO_BASEURL_DOWNLOAD"/org.onap.dcaegen2.utils/${RELEASE_TAGGED_DIR}scripts/mvn-phase-lib.sh; then
39 echo "Fail to download mvn-phase-lib.sh"
42 source "${PROJECT_ROOT}"/mvn-phase-lib.sh
45 TIMESTAMP=$(date +%C%y%m%dT%H%M%S)
46 export BUILD_NUMBER="${TIMESTAMP}"
51 echo "==> clean phase script"
54 rm -rf ./venv-* ./*.wgn ./site ./coverage.xml ./xunit-results.xml
57 echo "==> generate-sources phase script"
61 echo "==> compile phase script"
64 echo "==> test phase script"
67 echo "==> package phase script"
70 echo "==> install phase script"
71 case $MVN_PROJECT_MODULEID in
73 upload_files_of_extension sh
78 echo "==> deploy phase script"
80 case $MVN_PROJECT_MODULEID in
82 # build docker image from Docker file (under module dir) and push to registry
83 upload_files_of_extension sh
86 tca-cdap-container|cm-container|redis-cluster-container|healthcheck-container|pnda-mirror-container|pnda-bootstrap-container|tls-init-container|consul-loader-container|multisite-init-container|dcae-k8s-cleanup-container)
89 scripts|cloud_init|heat)
90 # upload all sh file under the root of module
91 upload_files_of_extension_recursively sh $MVN_PROJECT_MODULEID
92 upload_files_of_extension_recursively py $MVN_PROJECT_MODULEID
93 upload_files_of_extension_recursively yaml $MVN_PROJECT_MODULEID
96 echo "====> unknown mvn project module"
101 echo "==> unprocessed phase"