Remove explicit requirements to make build *any*
[dcaegen2/platform/plugins.git] / mvn-phase-script.sh
1 #!/bin/bash
2
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
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 set -ex
20
21
22 echo "running script: [$0] for module [$1] at stage [$2]"
23
24 MVN_PROJECT_MODULEID="$1"
25 MVN_PHASE="$2"
26
27 PROJECT_ROOT=$(dirname $0)
28
29 set -e
30 if ! wget -O ${PROJECT_ROOT}/mvn-phase-lib.sh \
31   "$MVN_RAWREPO_BASEURL_DOWNLOAD"/org.onap.dcaegen2.utils/R2/scripts/mvn-phase-lib.sh; then
32   cp "${PROJECT_ROOT}"/scripts/mvn-phase-lib.sh "${PROJECT_ROOT}/mvn-phase-lib.sh"
33 fi
34 source "${PROJECT_ROOT}"/mvn-phase-lib.sh
35
36
37 # Customize the section below for each project
38 case $MVN_PHASE in
39 clean)
40   echo "==> clean phase script"
41   clean_templated_files
42   clean_tox_files
43   rm -rf ./venv-* ./*.wgn ./site
44   ;;
45 generate-sources)
46   echo "==> generate-sources phase script"
47   expand_templates
48   ;;
49 compile)
50   echo "==> compile phase script"
51   ;;
52 test)
53   echo "==> test phase script"
54   run_tox_test
55   ;;
56 package)
57   echo "==> package phase script"
58   case $MVN_PROJECT_MODULEID in
59   cdap|dcae-policy|docker|relationships|k8s)
60     build_archives_for_wagons
61     build_wagons
62     ;;
63   *)
64     ;;
65   esac
66   ;;
67 install)
68   echo "==> install phase script"
69   ;;
70 deploy)
71   echo "==> deploy phase script"
72   case $MVN_PROJECT_MODULEID in
73   cdap|dcae-policy|docker|relationships|k8s)
74     upload_wagons_and_type_yamls
75     upload_wagon_archives
76     ;;
77   *)
78     ;;
79   esac
80   ;;
81 *)
82   echo "==> unprocessed phase"
83   ;;
84 esac