zeppelin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject incubator-zeppelin git commit: Create a release tool
Date Tue, 30 Jun 2015 17:43:31 GMT
Repository: incubator-zeppelin
Updated Branches:
  refs/heads/branch-0.5 647df1098 -> 6dec55de8


Create a release tool

It'll be nice Zeppelin projects has tool that helps making releases. https://issues.apache.org/jira/browse/ZEPPELIN-130

* [x] Ability to create a source release.
* [x] Ability to create binary releases.

Author: Lee moon soo <moon@apache.org>

Closes #119 from Leemoonsoo/release_tool and squashes the following commits:

4c55022 [Lee moon soo] Make and sign bin packages
0a48cfc [Lee moon soo] create source release

(cherry picked from commit 0c1b7455a37d608a82d7d8724eea4300424d0eb0)
Signed-off-by: Lee moon soo <moon@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/commit/6dec55de
Tree: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/tree/6dec55de
Diff: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/diff/6dec55de

Branch: refs/heads/branch-0.5
Commit: 6dec55de853d67594c46b76f44d770d7d91eb3ad
Parents: 647df10
Author: Lee moon soo <moon@apache.org>
Authored: Wed Jun 24 14:47:03 2015 -0700
Committer: Lee moon soo <moon@apache.org>
Committed: Tue Jun 30 10:43:28 2015 -0700

----------------------------------------------------------------------
 dev/create_release.sh | 127 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 127 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/6dec55de/dev/create_release.sh
----------------------------------------------------------------------
diff --git a/dev/create_release.sh b/dev/create_release.sh
new file mode 100755
index 0000000..b7af2e1
--- /dev/null
+++ b/dev/create_release.sh
@@ -0,0 +1,127 @@
+#!/bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# The script helps making a release.
+# You need specify a release name and branch|tag name.
+#
+# Here's some helpful documents for the release
+# http://www.apache.org/dev/release.html
+# http://www.apache.org/dev/release-publishing
+# http://incubator.apache.org/guides/releasemanagement.html
+# http://incubator.apache.org/guides/release.html
+# http://www.apache.org/dev/release-signing.html
+# http://www.apache.org/dev/publishing-maven-artifacts.html
+
+if [[ -z "${TAR}" ]]; then
+    TAR=/usr/bin/tar
+fi
+
+if [[ -z "${WORKING_DIR}" ]]; then
+    WORKING_DIR=/tmp/incubator-zeppelin-release
+fi
+
+if [[ -z "${GPG_PASSPHRASE}" ]]; then
+    echo "You need GPG_PASSPHRASE variable set"
+    exit 1
+fi
+
+
+if [[ $# -ne 2 ]]; then
+    echo "usage) $0 [Release name] [Branch or Tag]"
+    echo "   ex. $0 0.5.0-incubating branch-0.5"
+    exit 1
+fi
+
+RELEASE_NAME="${1}"
+BRANCH="${2}"
+
+
+if [[ -d "${WORKING_DIR}" ]]; then
+    echo "Dir ${WORKING_DIR} already exists"
+    exit 1
+fi
+
+mkdir ${WORKING_DIR}
+
+echo "Cloning the source and packaging"
+# clone source
+git clone -b ${BRANCH} git@github.com:apache/incubator-zeppelin.git ${WORKING_DIR}/zeppelin
+if [[ $? -ne 0 ]]; then
+    echo "Can not clone source repository"
+    exit 1
+fi
+
+# remove unnecessary files
+rm ${WORKING_DIR}/zeppelin/.gitignore
+rm -rf ${WORKING_DIR}/zeppelin/.git
+
+
+
+# create source package
+cd ${WORKING_DIR}
+cp -r zeppelin zeppelin-${RELEASE_NAME}
+${TAR} cvzf zeppelin-${RELEASE_NAME}.tgz zeppelin-${RELEASE_NAME}
+
+echo "Signing the source package"
+cd ${WORKING_DIR}
+echo $GPG_PASSPHRASE | gpg --passphrase-fd 0 --armor --output zeppelin-${RELEASE_NAME}.tgz.asc
--detach-sig ${WORKING_DIR}/zeppelin-${RELEASE_NAME}.tgz
+echo $GPG_PASSPHRASE | gpg --passphrase-fd 0 --print-md MD5 zeppelin-${RELEASE_NAME}.tgz
> ${WORKING_DIR}/zeppelin-${RELEASE_NAME}.tgz.md5
+echo $GPG_PASSPHRASE | gpg --passphrase-fd 0 --print-md SHA512 zeppelin-${RELEASE_NAME}.tgz
> ${WORKING_DIR}/zeppelin-${RELEASE_NAME}.tgz.sha
+
+
+function make_binary_release() {
+    BIN_RELEASE_NAME="${1}"
+    BUILD_FLAGS="${2}"
+
+    cp -r ${WORKING_DIR}/zeppelin ${WORKING_DIR}/zeppelin-${RELEASE_NAME}-bin-${BIN_RELEASE_NAME}
+    cd ${WORKING_DIR}/zeppelin-${RELEASE_NAME}-bin-${BIN_RELEASE_NAME}
+    echo "mvn clean package -Pbuild-distr -DskipTests ${BUILD_FLAGS}"
+    mvn clean package -Pbuild-distr -DskipTests ${BUILD_FLAGS}
+    if [[ $? -ne 0 ]]; then
+        echo "Build failed. ${BUILD_FLAGS}"
+        exit 1
+    fi
+
+    # re-create package with proper dir name
+    cd zeppelin-distribution/target
+    rm zeppelin-*.tar.gz
+    mv zeppelin-* zeppelin-${RELEASE_NAME}-bin-${BIN_RELEASE_NAME}
+    ${TAR} cvzf zeppelin-${RELEASE_NAME}-bin-${BIN_RELEASE_NAME}.tgz zeppelin-${RELEASE_NAME}-bin-${BIN_RELEASE_NAME}
+
+    # sign bin package
+    echo $GPG_PASSPHRASE | gpg --passphrase-fd 0 --armor --output zeppelin-${RELEASE_NAME}-bin-${BIN_RELEASE_NAME}.tgz.asc
--detach-sig zeppelin-${RELEASE_NAME}-bin-${BIN_RELEASE_NAME}.tgz
+    echo $GPG_PASSPHRASE | gpg --passphrase-fd 0 --print-md MD5 zeppelin-${RELEASE_NAME}-bin-${BIN_RELEASE_NAME}.tgz
> zeppelin-${RELEASE_NAME}-bin-${BIN_RELEASE_NAME}.tgz.md5
+    echo $GPG_PASSPHRASE | gpg --passphrase-fd 0 --print-md SHA512 zeppelin-${RELEASE_NAME}-bin-${BIN_RELEASE_NAME}.tgz
> zeppelin-${RELEASE_NAME}-bin-${BIN_RELEASE_NAME}.tgz.sha
+
+    mv zeppelin-${RELEASE_NAME}-bin-${BIN_RELEASE_NAME}.tgz ${WORKING_DIR}/
+    mv zeppelin-${RELEASE_NAME}-bin-${BIN_RELEASE_NAME}.tgz.asc ${WORKING_DIR}/
+    mv zeppelin-${RELEASE_NAME}-bin-${BIN_RELEASE_NAME}.tgz.md5 ${WORKING_DIR}/
+    mv zeppelin-${RELEASE_NAME}-bin-${BIN_RELEASE_NAME}.tgz.sha ${WORKING_DIR}/
+
+    # clean up build dir
+    rm -rf ${WORKING_DIR}/zeppelin-${RELEASE_NAME}-bin-${BIN_RELEASE_NAME}
+}
+
+make_binary_release spark-1.4.0_hadoop-2.3 -Pyarn -Pspark-1.4 -Dspark.version=1.4.0 -Phadoop-2.3
+make_binary_release spark-1.3.1_hadoop-2.3 -Pyarn -Pspark-1.3 -Dspark.version=1.3.1 -Phadoop-2.3
+
+# remove non release files and dirs
+rm -rf ${WORKING_DIR}/zeppelin
+rm -rf ${WORKING_DIR}/zeppelin-${RELEASE_NAME}
+echo "Release files are created under ${WORKING_DIR}"


Mime
View raw message