-
Notifications
You must be signed in to change notification settings - Fork 53
/
build.sh
executable file
·56 lines (43 loc) · 1.43 KB
/
build.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
#!/usr/bin/env bash
# Prevent jenkins from immediately killing the script when a step fails, allowing us to notify github:
set +e
export REPO_ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $REPO_ROOT_DIR
# Grab dcos-commons build/release tools:
rm -rf dcos-commons-tools/ && curl https://infinity-artifacts.s3.amazonaws.com/dcos-commons-tools.tgz | tar xz
# GitHub notifier config
_notify_github() {
$REPO_ROOT_DIR/dcos-commons-tools/github_update.py $1 build $2
}
# Build steps for Cassandra
_notify_github pending "Build running"
# Scheduler/Executor (Java):
./gradlew --refresh-dependencies distZip
if [ $? -ne 0 ]; then
_notify_github failure "Gradle build failed"
exit 1
fi
# try disabling 'org.gradle.parallel', which seems to cause this step to hang:
sed -i 's/parallel=true/parallel=false/g' gradle.properties
./gradlew check
if [ $? -ne 0 ]; then
_notify_github failure "Unit tests failed"
exit 1
fi
# CLI (Go):
cd cli/ && ./build-cli.sh
if [ $? -ne 0 ]; then
_notify_github failure "CLI build failed"
exit 1
fi
cd $REPO_ROOT_DIR
_notify_github success "Build succeeded"
./dcos-commons-tools/publish_aws.py \
cassandra \
universe/ \
cassandra-scheduler/build/distributions/scheduler.zip \
cassandra-executor/build/distributions/executor.zip \
cli/dcos-cassandra/dcos-cassandra-darwin \
cli/dcos-cassandra/dcos-cassandra-linux \
cli/dcos-cassandra/dcos-cassandra.exe \
cli/python/dist/*.whl