-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·56 lines (37 loc) · 1.03 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
#!/bin/bash
set -e
if [ ! $1 ]; then
echo "error!"
exit 1
fi
export HADOOP_USER_NAME=root
d=$(date -u +"%Y-%m-%dT%H%M%SZ")
SBT_OPTS="-Xms4096M -Xmx4096M -Xss16M" sbt -Dsbt.override.build.repos=true -Dconf=$1 clean core/universal:packageZipTarball cache/universal:packageZipTarball
p1=${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}/${CI_COMMIT_REF_NAME}/${CI_COMMIT_SHA}/$1
localdir=/home/output/$p1
cd ./core/target/universal/
for i in $(ls . | grep -v SHA1SUMS)
do
if [ -f $i ] ; then
echo $(sha1sum $i) >> SHA1SUMS
fi
done
cd -
cd ./cache/target/universal/
for i in $(ls . | grep -v SHA1SUMS)
do
if [ -f $i ] ; then
echo $(sha1sum $i) >> SHA1SUMS
fi
done
cd -
mkdir -pv $localdir/{core,cache}
cp -vr core/target/universal/* $localdir/core/
cp -vr cache/target/universal/* $localdir/cache/
touch core/target/universal/${d}.txt
touch cache/target/universal/${d}.txt
rm -vfr core/target/universal/tmp
rm -vfr cache/target/universal/tmp
echo "build completed."
echo "packages in local: $localdir"
exit 0