-
Notifications
You must be signed in to change notification settings - Fork 13
/
make_binary_release.sh
executable file
·86 lines (76 loc) · 3.9 KB
/
make_binary_release.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
## Quick and dirty script to package up release tarballs for Spark.
## This should be copied into and run in an otherwise empty directory.
## This script assumes that a release has already been cut using the
## Maven release plug-in.
# Would be nice to add:
# Re-write in Python
# Send output to stderr and have useful logging in stdout
# Have this call the maven release plugin to actually create
# releases
RELEASE_TAG=00c847af
RELEASE_VERSION=0.9.0-incubating
RC_NAME=rc2
USER_NAME=pwendell # user with account at people.apache.org
set -e
# Base directory for releases
git clone https://git-wip-us.apache.org/repos/asf/incubator-spark.git
cd incubator-spark
git checkout --force $RELEASE_TAG
rm .gitignore
rm -rf .git
cd ..
# Source release
cp -r incubator-spark spark-$RELEASE_VERSION
tar cvzf spark-$RELEASE_VERSION.tgz spark-$RELEASE_VERSION
gpg --armour --output spark-$RELEASE_VERSION.tgz.asc --detach-sig spark-$RELEASE_VERSION.tgz
gpg --print-md MD5 spark-$RELEASE_VERSION.tgz > spark-$RELEASE_VERSION.tgz.md5
gpg --print-md SHA512 spark-$RELEASE_VERSION.tgz > spark-$RELEASE_VERSION.tgz.sha
rm -rf spark-$RELEASE_VERSION
# Hadoop 1 release
cp -r incubator-spark spark-$RELEASE_VERSION-bin-hadoop1
cd spark-$RELEASE_VERSION-bin-hadoop1
export MAVEN_OPTS="-Xmx3g -XX:MaxPermSize=1g -XX:ReservedCodeCacheSize=1g"
mvn -Dhadoop.version=1.0.4 -DskipTests clean package
find . -name test-classes -type d | xargs rm -rf
find . -name classes -type d | xargs rm -rf
cd ..
tar cvzf spark-$RELEASE_VERSION-bin-hadoop1.tgz spark-$RELEASE_VERSION-bin-hadoop1
gpg --armour --output spark-$RELEASE_VERSION-bin-hadoop1.tgz.asc --detach-sig spark-$RELEASE_VERSION-bin-hadoop1.tgz
gpg --print-md MD5 spark-$RELEASE_VERSION-bin-hadoop1.tgz > spark-$RELEASE_VERSION-bin-hadoop1.tgz.md5
gpg --print-md SHA512 spark-$RELEASE_VERSION-bin-hadoop1.tgz > spark-$RELEASE_VERSION-bin-hadoop1.tgz.sha
rm -rf spark-$RELEASE_VERSION-bin-hadoop1
# CDH4 Release
cp -r incubator-spark spark-$RELEASE_VERSION-bin-cdh4
cd spark-$RELEASE_VERSION-bin-cdh4
export MAVEN_OPTS="-Xmx3g -XX:MaxPermSize=1g -XX:ReservedCodeCacheSize=1g"
mvn -Dhadoop.version=2.0.0-mr1-cdh4.2.0 -DskipTests package
find . -name test-classes -type d | xargs rm -rf
find . -name classes -type d | xargs rm -rf
cd ..
tar cvzf spark-$RELEASE_VERSION-bin-cdh4.tgz spark-$RELEASE_VERSION-bin-cdh4
gpg --armour --output spark-$RELEASE_VERSION-bin-cdh4.tgz.asc --detach-sig spark-$RELEASE_VERSION-bin-cdh4.tgz
gpg --print-md MD5 spark-$RELEASE_VERSION-bin-cdh4.tgz > spark-$RELEASE_VERSION-bin-cdh4.tgz.md5
gpg --print-md SHA512 spark-$RELEASE_VERSION-bin-cdh4.tgz > spark-$RELEASE_VERSION-bin-cdh4.tgz.sha
rm -rf spark-$RELEASE_VERSION-bin-cdh4
# Hadoop 2 Release
cp -r incubator-spark spark-$RELEASE_VERSION-bin-hadoop2
cd spark-$RELEASE_VERSION-bin-hadoop2
export MAVEN_OPTS="-Xmx3g -XX:MaxPermSize=1g -XX:ReservedCodeCacheSize=1g"
mvn -Pyarn -Dhadoop.version=2.2.0 -Dyarn.version=2.2.0 -DskipTests package
find . -name test-classes -type d | xargs rm -rf
find . -name classes -type d | xargs rm -rf
cd ..
tar cvzf spark-$RELEASE_VERSION-bin-hadoop2.tgz spark-$RELEASE_VERSION-bin-hadoop2
gpg --armour --output spark-$RELEASE_VERSION-bin-hadoop2.tgz.asc --detach-sig spark-$RELEASE_VERSION-bin-hadoop2.tgz
gpg --print-md MD5 spark-$RELEASE_VERSION-bin-hadoop2.tgz > spark-$RELEASE_VERSION-bin-hadoop2.tgz.md5
gpg --print-md SHA512 spark-$RELEASE_VERSION-bin-hadoop2.tgz > spark-$RELEASE_VERSION-bin-hadoop2.tgz.sha
rm -rf spark-$RELEASE_VERSION-bin-hadoop2
# Copy data
ssh [email protected] mkdir /home/$USER_NAME/public_html/spark-$RELEASE_VERSION-$RC_NAME
scp spark* [email protected]:/home/$USER_NAME/public_html/spark-$RELEASE_VERSION-$RC_NAME/
# Docs
cd incubator-spark
cd docs
jekyll build
ssh [email protected] mkdir /home/$USER_NAME/public_html/spark-$RELEASE_VERSION-$RC_NAME-docs
scp -r _site/* [email protected]:/home/$USER_NAME/public_html/spark-$RELEASE_VERSION-$RC_NAME-docs/