-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbuild-marathon-jar.sh
More file actions
executable file
·40 lines (31 loc) · 1.08 KB
/
build-marathon-jar.sh
File metadata and controls
executable file
·40 lines (31 loc) · 1.08 KB
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
#!/usr/bin/env bash
# fail on any command exiting non-zero
set -eo pipefail
if [[ -z $DOCKER_BUILD ]]; then
echo
echo "Note: this script is intended for use by the Dockerfile and not as a way to build marathon locally"
echo
exit 1
fi
# shellcheck disable=SC2034
DEBIAN_FRONTEND=noninteractive
apt-get update && apt-get install --no-install-recommends -y \
openjdk-7-jdk \
scala \
curl
curl -SsL -O http://dl.bintray.com/sbt/debian/sbt-0.13.5.deb && \
dpkg -i sbt-0.13.5.deb
curl -sSL "https://github.com/mesosphere/marathon/archive/v$MARATHON_VERSION.tar.gz" | tar -xzf - -C /opt
ln -s "/opt/marathon-$MARATHON_VERSION" /app
ln -s "/opt/marathon-$MARATHON_VERSION" /marathon
cd /app
# Word splitting wanted in this situation.
# shellcheck disable=SC2046
sbt assembly && \
mv $(find target -name 'marathon-assembly-*.jar' | sort | tail -1) ./ && \
rm -rf target/* ~/.sbt ~/.ivy2 && \
mv marathon-assembly-*.jar target
# cleanup. indicate that python, libpq and libyanl are required packages.
apt-get clean -y && \
rm -rf /tmp/* /var/tmp/* && \
rm -rf /var/lib/apt/lists/*