forked from fnproject/fdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·56 lines (45 loc) · 1.09 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
set -e
set -x
mkdir -p /tmp/staging_repo
rm -rf /tmp/staging_repo/*
BUILD_VERSION=${FN_FDK_VERSION:-1.0.0-SNAPSHOT}
export REPOSITORY_LOCATION=${REPOSITORY_LOCATION:-/tmp/staging_repo}
while [ $# -ne 0 ]
do
case "$1" in
--build-native-java)
BUILD_NATIVE_JAVA=true
;;
esac
shift
done
(
runtime/src/main/c/rebuild_so.sh
)
mvn -B deploy -DaltDeploymentRepository=localStagingDir::default::file://${REPOSITORY_LOCATION}
(
cd images/build
./docker-build.sh --no-cache -t fnproject/fn-java-fdk-build:${BUILD_VERSION} .
)
(
cd images/build
./docker-build.sh --no-cache -f Dockerfile-jdk11 -t fnproject/fn-java-fdk-build:jdk11-${BUILD_VERSION} .
)
(
cd runtime
docker build --no-cache -t fnproject/fn-java-fdk:${BUILD_VERSION} -f ../images/runtime/Dockerfile .
)
(
cd runtime
docker build --no-cache -f ../images/runtime/Dockerfile-jre11 -t fnproject/fn-java-fdk:jre11-${BUILD_VERSION} .
)
(
workdir=$(pwd)/runtime
cd images/build-native
./docker-build.sh ${workdir}
)
(
cd images/init-native
./docker-build.sh
)