-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease-etm.sh
executable file
·91 lines (71 loc) · 2.72 KB
/
release-etm.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/bin/bash
SRC=~/Source
DEST=~/Build
function clone_github {
mkdir $SRC
cd $SRC
git clone [email protected]:edmunds/edmunds-configuration.git
git clone [email protected]:edmunds/automated-test.git
git clone [email protected]:edmunds/etm-agent.git
git clone [email protected]:edmunds/etm-api.git
git clone [email protected]:edmunds/etm-client.git
git clone [email protected]:edmunds/etm-core.git
git clone [email protected]:edmunds/zookeeper-common.git
}
function do_sync {
p4 sync /perforce/edmunds/libraries/automated-test/main/...
p4 sync /perforce/edmunds/libraries/configuration/...
p4 sync /perforce/edmunds/libraries/etm-common/...
p4 sync /perforce/edmunds/services/etm-agent/main/...
p4 sync /perforce/edmunds/libraries/etm-client/main/...
p4 sync /perforce/edmunds/services/etm/main/...
p4 sync /perforce/edmunds/libraries/zookeeper-common/main/...
}
function copy_code {
rm -rf $DEST
cp -r $SRC $DEST
find $DEST -name "*.java" | xargs rm
cp -r /perforce/edmunds/libraries/automated-test/main/src $DEST/automated-test
cp -r /perforce/edmunds/libraries/configuration/configuration-common/main/src $DEST/edmunds-configuration
cp -r /perforce/edmunds/libraries/configuration/configuration-dns/main/src $DEST/edmunds-configuration
cp -r /perforce/edmunds/services/etm-agent/main/src $DEST/etm-agent
cp -r /perforce/edmunds/libraries/etm-common/main/src $DEST/etm-api/etm-common
cp -r /perforce/edmunds/services/etm/main/etm-loadbalancer-api/src $DEST/etm-api/etm-loadbalancer-api
cp -r /perforce/edmunds/libraries/etm-client/main/etm-client-core/src $DEST/etm-client/etm-client-core
cp -r /perforce/edmunds/libraries/etm-client/main/etm-client-impl/src $DEST/etm-client/etm-client-impl
cp -r /perforce/edmunds/services/etm/main/etm-controller/src $DEST/etm-core/etm-controller
cp -r /perforce/edmunds/services/etm/main/etm-dummy-loadbalancer/src $DEST/etm-core/etm-dummy-loadbalancer
cp -r /perforce/edmunds/services/etm/main/etm-url-token-tool/src $DEST/etm-core/etm-url-token-tool
cp -r /perforce/edmunds/libraries/zookeeper-common/main/src $DEST/zookeeper-common
chmod -R u+w $DEST
rm $DEST/etm-agent/src/main/resources/META-INF/install-chef.sh
rm $DEST/etm-client/etm-client-core/src/test/resources/testng.xml
rm $DEST/etm-core/etm-dummy-loadbalancer/src/test/resources/testng.xml
rm $DEST/etm-core/etm-url-token-tool/src/test/resources/testng.xml
}
function build_all {
cd $DEST/automated-test && \
mvn clean install && \
\
cd $DEST/edmunds-configuration && \
mvn clean install && \
\
cd $DEST/zookeeper-common && \
mvn clean install && \
\
cd $DEST/etm-api && \
mvn clean install && \
\
cd $DEST/etm-client && \
mvn clean install && \
\
cd $DEST/etm-core && \
mvn clean install && \
\
cd $DEST/etm-agent && \
mvn clean install
}
clone_github
do_sync
copy_code
build_all