-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·49 lines (35 loc) · 1.23 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
#!/bin/bash
# This script does a full build/upload of Reference artifacts.
# This script is invoked by Jenkins CI, as well as by build-docker.sh.
# Prevent jenkins from immediately killing the script when a step fails, allowing us to notify github:
set +e
REPO_ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $REPO_ROOT_DIR
if [ -z "$AWS_ACCESS_KEY_ID" -o -z "$AWS_SECRET_ACCESS_KEY" ]; then
echo "Missing required AWS access info: AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY"
exit 1
fi
# 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
}
_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
./gradlew check
if [ $? -ne 0 ]; then
_notify_github failure "Unit tests failed"
exit 1
fi
cd $REPO_ROOT_DIR
_notify_github success "Build succeeded"
./dcos-commons-tools/ci_upload.py \
reference-framework \
universe/ \
reference-scheduler/build/distributions/*.zip \