blob: 904c74a7df3c80cf5c64a7c35960e1042bb03f78 [file] [log] [blame]
Lusheng Ji487c0cc2017-08-22 21:44:29 -07001#!/bin/bash
2
3echo "running script: [$0] for module [$1] at stage [$2]"
4
5echo "=> Prepare environment "
6#env
7
8TIMESTAMP=$(date +%C%y%m%dT%H%M%S)
9export BUILD_NUMBER="${TIMESTAMP}"
10
11# expected environment variables
12if [ -z "${MVN_NEXUSPROXY}" ]; then
13 echo "MVN_NEXUSPROXY environment variable not set. Cannot proceed"
14 exit
15fi
16MVN_NEXUSPROXY_HOST=$(echo $MVN_NEXUSPROXY |cut -f3 -d'/' | cut -f1 -d':')
17
18
19# use the version text detect which phase we are in in LF CICD process: verify, merge, or (daily) release
20
21# mvn phase in life cycle
22MVN_PHASE="$2"
23
24case $MVN_PHASE in
25clean)
26 echo "==> clean phase script"
27 ;;
28generate-sources)
29 echo "==> generate-sources phase script"
30 ;;
31compile)
32 echo "==> compile phase script"
33 ;;
34test)
35 echo "==> test phase script"
36 ;;
37package)
38 echo "==> package phase script"
39 ;;
40install)
41 echo "==> install phase script"
42 ;;
43deploy)
44 echo "==> deploy phase script"
45 ;;
46*)
47 echo "==> unprocessed phase"
48 ;;
49esac
50