You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by al...@apache.org on 2017/07/28 19:38:42 UTC

[1/3] flink git commit: [FLINK-7281] Remove old and misleading release scripts/README

Repository: flink
Updated Branches:
  refs/heads/master 8e3677310 -> 18733d82e


[FLINK-7281] Remove old and misleading release scripts/README


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/50a818b1
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/50a818b1
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/50a818b1

Branch: refs/heads/master
Commit: 50a818b1bb74e9442478157bb10c0d5de05ad665
Parents: 8e36773
Author: Aljoscha Krettek <al...@gmail.com>
Authored: Tue Jul 25 15:07:59 2017 +0200
Committer: Aljoscha Krettek <al...@gmail.com>
Committed: Fri Jul 28 21:27:05 2017 +0200

----------------------------------------------------------------------
 tools/how_to_release.md  | 34 ----------------------------------
 tools/prepare_release.sh | 23 -----------------------
 2 files changed, 57 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/50a818b1/tools/how_to_release.md
----------------------------------------------------------------------
diff --git a/tools/how_to_release.md b/tools/how_to_release.md
deleted file mode 100644
index 7064736..0000000
--- a/tools/how_to_release.md
+++ /dev/null
@@ -1,34 +0,0 @@
-<!--
-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.
--->
-# How to release a new version of Apache Flink
-
-
-You need to have the following environment variables set:
-
-export OLD_VERSION=0.6-SNAPSHOT
-export NEW_VERSION=0.6
-export GPG_KEY=XX
-export GPG_PASSPHRASE=XX
-
-./prepare_release_files.sh
-
-
-
-
-

http://git-wip-us.apache.org/repos/asf/flink/blob/50a818b1/tools/prepare_release.sh
----------------------------------------------------------------------
diff --git a/tools/prepare_release.sh b/tools/prepare_release.sh
deleted file mode 100644
index 7accbea..0000000
--- a/tools/prepare_release.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env 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.
-#
-
-echo "Updating version from $OLD_VERSION to $NEW_VERSION"
-
-find flink -name 'pom.xml' -type f -exec sed -i 's#<version>$OLD_VERSION</version>#<version>$NEW_VERSION</version>#' {} \;
-


[2/3] flink git commit: [FLINK-7281] Make quickstart versions depend on project versions

Posted by al...@apache.org.
[FLINK-7281] Make quickstart versions depend on project versions


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/f1c92f23
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/f1c92f23
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/f1c92f23

Branch: refs/heads/master
Commit: f1c92f2367183d7e215466b3ff227fff11efc470
Parents: 50a818b
Author: Aljoscha Krettek <al...@gmail.com>
Authored: Tue Jul 25 15:30:26 2017 +0200
Committer: Aljoscha Krettek <al...@gmail.com>
Committed: Fri Jul 28 21:28:48 2017 +0200

----------------------------------------------------------------------
 .../src/main/resources/archetype-resources/pom.xml           | 6 +++---
 .../src/main/resources/archetype-resources/pom.xml           | 6 +++---
 pom.xml                                                      | 8 +++++---
 tools/create_release_files.sh                                | 3 ---
 4 files changed, 11 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/f1c92f23/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/pom.xml
----------------------------------------------------------------------
diff --git a/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/pom.xml b/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/pom.xml
index 44c56b9..7409329 100644
--- a/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/pom.xml
+++ b/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/pom.xml
@@ -30,9 +30,9 @@ under the License.
 
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<flink.version>1.4-SNAPSHOT</flink.version>
-		<slf4j.version>1.7.7</slf4j.version>
-		<log4j.version>1.2.17</log4j.version>
+		<flink.version>@project.version@</flink.version>
+		<slf4j.version>@slf4j.version@</slf4j.version>
+		<log4j.version>@log4j.version</log4j.version>
 		<scala.binary.version>@scala.binary.version@</scala.binary.version>
 	</properties>
 

http://git-wip-us.apache.org/repos/asf/flink/blob/f1c92f23/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/pom.xml
----------------------------------------------------------------------
diff --git a/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/pom.xml b/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/pom.xml
index ff33a6e..cddaf45 100644
--- a/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/pom.xml
+++ b/flink-quickstart/flink-quickstart-scala/src/main/resources/archetype-resources/pom.xml
@@ -45,9 +45,9 @@ under the License.
 
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<flink.version>1.4-SNAPSHOT</flink.version>
-		<slf4j.version>1.7.7</slf4j.version>
-		<log4j.version>1.2.17</log4j.version>
+		<flink.version>@project.version@</flink.version>
+		<slf4j.version>@slf4j.version@</slf4j.version>
+		<log4j.version>@log4j.version</log4j.version>
 		<scala.binary.version>@scala.binary.version@</scala.binary.version>
 	</properties>
 

http://git-wip-us.apache.org/repos/asf/flink/blob/f1c92f23/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index b7a9112..93d0470 100644
--- a/pom.xml
+++ b/pom.xml
@@ -96,6 +96,8 @@ under the License.
 		<guava.version>18.0</guava.version>
 		<akka.version>2.3-custom</akka.version>
 		<java.version>1.7</java.version>
+		<slf4j.version>1.7.7</slf4j.version>
+		<log4j.version>1.2.17</log4j.version>
 		<!-- Overwrite default values from parent pom.
 			 Intellij is (sometimes?) using those values to choose target language level
 			 and thus is changing back to java 1.6 on each maven re-import -->
@@ -231,19 +233,19 @@ under the License.
 			<dependency>
 				<groupId>org.slf4j</groupId>
 				<artifactId>slf4j-api</artifactId>
-				<version>1.7.7</version>
+				<version>${slf4j.version}</version>
 			</dependency>
 
 			<dependency>
 				<groupId>org.slf4j</groupId>
 				<artifactId>slf4j-log4j12</artifactId>
-				<version>1.7.7</version>
+				<version>${slf4j.version}</version>
 			</dependency>
 
 			<dependency>
 				<groupId>log4j</groupId>
 				<artifactId>log4j</artifactId>
-				<version>1.2.17</version>
+				<version>${log4j.version}</version>
 			</dependency>
 
 			<dependency>

http://git-wip-us.apache.org/repos/asf/flink/blob/f1c92f23/tools/create_release_files.sh
----------------------------------------------------------------------
diff --git a/tools/create_release_files.sh b/tools/create_release_files.sh
index 663b634..48641c0 100755
--- a/tools/create_release_files.sh
+++ b/tools/create_release_files.sh
@@ -175,9 +175,6 @@ make_source_release() {
   #change version in all pom files
   find . -name 'pom.xml' -type f -exec perl -pi -e 's#<version>'$OLD_VERSION'</version>#<version>'$NEW_VERSION'</version>#' {} \;
 
-  #change version in quickstart archetypes
-  find . -name 'pom.xml' -type f -exec perl -pi -e 's#<flink.version>'$OLD_VERSION'</flink.version>#<flink.version>'$NEW_VERSION'</flink.version>#' {} \;
-
   #change version of documentation
   cd docs
   perl -pi -e "s#^version: .*#version: ${NEW_VERSION}#" _config.yml


[3/3] flink git commit: [FLINK-7290] Add modular release scripts

Posted by al...@apache.org.
[FLINK-7290] Add modular release scripts


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/18733d82
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/18733d82
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/18733d82

Branch: refs/heads/master
Commit: 18733d82e694997e229afb50f13c21fcc1c65729
Parents: f1c92f2
Author: Aljoscha Krettek <al...@gmail.com>
Authored: Thu Jul 27 15:07:44 2017 +0200
Committer: Aljoscha Krettek <al...@gmail.com>
Committed: Fri Jul 28 21:36:24 2017 +0200

----------------------------------------------------------------------
 tools/releasing/create_binary_release.sh | 102 ++++++++++++++++++++++++++
 tools/releasing/create_release_branch.sh |  69 +++++++++++++++++
 tools/releasing/create_source_release.sh |  63 ++++++++++++++++
 tools/releasing/deploy_staging_jars.sh   |  51 +++++++++++++
 4 files changed, 285 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/18733d82/tools/releasing/create_binary_release.sh
----------------------------------------------------------------------
diff --git a/tools/releasing/create_binary_release.sh b/tools/releasing/create_binary_release.sh
new file mode 100755
index 0000000..77715e5
--- /dev/null
+++ b/tools/releasing/create_binary_release.sh
@@ -0,0 +1,102 @@
+#!/usr/bin/env 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.
+#
+
+##
+## Variables with defaults (if not overwritten by environment)
+##
+RELEASE_VERSION=${RELEASE_VERSION:-1.3-SNAPSHOT}
+SCALA_VERSION=none
+HADOOP_VERSION=none
+SKIP_GPG=${SKIP_GPG:-false}
+MVN=${MVN:-mvn}
+
+# fail immediately
+set -o errexit
+set -o nounset
+# print command before executing
+set -o xtrace
+
+CURR_DIR=`pwd`
+if [[ `basename $CURR_DIR` != "tools" ]] ; then
+  echo "You have to call the script from the tools/ dir"
+  exit 1
+fi
+
+if [ "$(uname)" == "Darwin" ]; then
+    SHASUM="shasum -a 512"
+    MD5SUM="md5 -r"
+else
+    SHASUM="sha512sum"
+    MD5SUM="md5sum"
+fi
+
+###########################
+
+# build maven package, create Flink distribution, generate signature
+make_binary_release() {
+  NAME=$1
+  FLAGS=$2
+  SCALA_VERSION=$3
+
+  echo "Creating binary release name: $NAME, flags: $FLAGS, SCALA_VERSION: ${SCALA_VERSION}"
+  dir_name="flink-$RELEASE_VERSION-bin-$NAME-scala_${SCALA_VERSION}"
+
+  # enable release profile here (to check for the maven version)
+  $MVN clean package $FLAGS -DskipTests -Prelease,scala-${SCALA_VERSION} -Dgpg.skip
+
+  cd flink-dist/target/flink-*-bin/
+  tar czf "${dir_name}.tgz" flink-*
+
+  cp flink-*.tgz ../../../
+  cd ../../../
+
+  # Sign md5 and sha the tgz
+  if [ "$SKIP_GPG" == "false" ] ; then
+    gpg --armor --detach-sig "${dir_name}.tgz"
+  fi
+  $MD5SUM "${dir_name}.tgz" > "${dir_name}.tgz.md5"
+  $SHASUM "${dir_name}.tgz" > "${dir_name}.tgz.sha"
+}
+
+cd ..
+
+
+if [ "$SCALA_VERSION" == "none" ] && [ "$HADOOP_VERSION" == "none" ]; then
+  make_binary_release "hadoop2" "" 2.10
+  make_binary_release "hadoop24" "-Dhadoop.version=2.4.1" "2.10"
+  make_binary_release "hadoop26" "-Dhadoop.version=2.6.3" "2.10"
+  make_binary_release "hadoop27" "-Dhadoop.version=2.7.2" "2.10"
+
+  make_binary_release "hadoop2" "" 2.11
+  make_binary_release "hadoop24" "-Dhadoop.version=2.4.1" "2.11"
+  make_binary_release "hadoop26" "-Dhadoop.version=2.6.3" "2.11"
+  make_binary_release "hadoop27" "-Dhadoop.version=2.7.2" "2.11"
+elif [ "$SCALA_VERSION" == none ] && [ "$HADOOP_VERSION" != "none" ]
+then
+  make_binary_release "hadoop2" "-Dhadoop.version=$HADOOP_VERSION" "2.10"
+  make_binary_release "hadoop2" "-Dhadoop.version=$HADOOP_VERSION" "2.11"
+elif [ "$SCALA_VERSION" != none ] && [ "$HADOOP_VERSION" == "none" ]
+then
+  make_binary_release "hadoop2" "" $SCALA_VERSION
+  make_binary_release "hadoop24" "-Dhadoop.version=2.4.1" "$SCALA_VERSION"
+  make_binary_release "hadoop26" "-Dhadoop.version=2.6.3" "$SCALA_VERSION"
+  make_binary_release "hadoop27" "-Dhadoop.version=2.7.2" "$SCALA_VERSION"
+else
+  make_binary_release "hadoop2x" "-Dhadoop.version=$HADOOP_VERSION" "$SCALA_VERSION"
+fi

http://git-wip-us.apache.org/repos/asf/flink/blob/18733d82/tools/releasing/create_release_branch.sh
----------------------------------------------------------------------
diff --git a/tools/releasing/create_release_branch.sh b/tools/releasing/create_release_branch.sh
new file mode 100755
index 0000000..c2bca88
--- /dev/null
+++ b/tools/releasing/create_release_branch.sh
@@ -0,0 +1,69 @@
+#!/usr/bin/env 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.
+#
+
+##
+## Variables with defaults (if not overwritten by environment)
+##
+OLD_VERSION=${OLD_VERSION:-1.2-SNAPSHOT}
+NEW_VERSION=${NEW_VERSION:-1.3-SNAPSHOT}
+RELEASE_CANDIDATE=${RELEASE_CANDIDATE:-none}
+MVN=${MVN:-mvn}
+
+# fail immediately
+set -o errexit
+set -o nounset
+# print command before executing
+set -o xtrace
+
+CURR_DIR=`pwd`
+if [[ `basename $CURR_DIR` != "tools" ]] ; then
+  echo "You have to call the script from the tools/ dir"
+  exit 1
+fi
+
+###########################
+
+cd ..
+
+target_branch=release-$NEW_VERSION
+if [ "$RELEASE_CANDIDATE" != "none" ]; then
+  target_branch=$target_branch-$RELEASE_CANDIDATE
+fi
+
+git checkout -b $target_branch
+
+#change version in all pom files
+find . -name 'pom.xml' -type f -exec perl -pi -e 's#<version>'$OLD_VERSION'</version>#<version>'$NEW_VERSION'</version>#' {} \;
+
+#change version of documentation
+cd docs
+perl -pi -e "s#^version: .*#version: \"${NEW_VERSION}\"#" _config.yml
+
+# The version in the title should not contain the bugfix version (e.g. 1.3)
+VERSION_TITLE=$(echo $NEW_VERSION | sed 's/\.[^.]*$//')
+perl -pi -e "s#^version_title: .*#version_title: ${VERSION_TITLE}#" _config.yml
+perl -pi -e "s#^version_javadocs: .*#version_javadocs: ${VERSION_TITLE}#" _config.yml
+cd ..
+
+git commit -am "Commit for release $NEW_VERSION"
+
+RELEASE_HASH=`git rev-parse HEAD`
+echo "Echo created release hash $RELEASE_HASH"
+
+echo "Done. Don't forget to create the signed release tag at the end and push the changes."

http://git-wip-us.apache.org/repos/asf/flink/blob/18733d82/tools/releasing/create_source_release.sh
----------------------------------------------------------------------
diff --git a/tools/releasing/create_source_release.sh b/tools/releasing/create_source_release.sh
new file mode 100755
index 0000000..2b29527
--- /dev/null
+++ b/tools/releasing/create_source_release.sh
@@ -0,0 +1,63 @@
+#!/usr/bin/env 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.
+#
+
+##
+## Variables with defaults (if not overwritten by environment)
+##
+RELEASE_VERSION=${RELEASE_VERSION:-1.3-SNAPSHOT}
+MVN=${MVN:-mvn}
+
+# fail immediately
+set -o errexit
+set -o nounset
+# print command before executing
+set -o xtrace
+
+CURR_DIR=`pwd`
+if [[ `basename $CURR_DIR` != "tools" ]] ; then
+  echo "You have to call the script from the tools/ dir"
+  exit 1
+fi
+
+if [ "$(uname)" == "Darwin" ]; then
+    SHASUM="shasum -a 512"
+    MD5SUM="md5 -r"
+else
+    SHASUM="sha512sum"
+    MD5SUM="md5sum"
+fi
+
+###########################
+
+cd ..
+
+echo "Creating source package"
+
+rsync -a \
+  --exclude ".git" --exclude ".gitignore" --exclude ".gitattributes" --exclude ".travis.yml" \
+  --exclude "deploysettings.xml" --exclude "CHANGELOG" --exclude ".github" --exclude "target" \
+  --exclude ".idea" --exclude "*.iml" --exclude ".DS_Store" --exclude "build-target" \
+  . flink-$RELEASE_VERSION
+
+tar czf flink-${RELEASE_VERSION}-src.tgz flink-$RELEASE_VERSION
+gpg --armor --detach-sig flink-$RELEASE_VERSION-src.tgz
+$MD5SUM flink-$RELEASE_VERSION-src.tgz > flink-$RELEASE_VERSION-src.tgz.md5
+$SHASUM flink-$RELEASE_VERSION-src.tgz > flink-$RELEASE_VERSION-src.tgz.sha
+
+rm -rf flink-$RELEASE_VERSION

http://git-wip-us.apache.org/repos/asf/flink/blob/18733d82/tools/releasing/deploy_staging_jars.sh
----------------------------------------------------------------------
diff --git a/tools/releasing/deploy_staging_jars.sh b/tools/releasing/deploy_staging_jars.sh
new file mode 100755
index 0000000..a379f8f
--- /dev/null
+++ b/tools/releasing/deploy_staging_jars.sh
@@ -0,0 +1,51 @@
+#!/usr/bin/env 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.
+#
+
+##
+## Variables with defaults (if not overwritten by environment)
+##
+MVN=${MVN:-mvn}
+
+# fail immediately
+set -o errexit
+set -o nounset
+# print command before executing
+set -o xtrace
+
+CURR_DIR=`pwd`
+if [[ `basename $CURR_DIR` != "tools" ]] ; then
+  echo "You have to call the script from the tools/ dir"
+  exit 1
+fi
+
+###########################
+
+cd ..
+
+echo "Deploying to repository.apache.org"
+
+echo "Deploying Scala 2.11 version"
+$MVN clean deploy -Prelease,docs-and-source,scala-2.11 -DskipTests -DretryFailedDeploymentCount=10
+
+# It is important to first deploy scala 2.11 and then scala 2.10 so that the quickstarts (which are independent of the scala version)
+# are depending on scala 2.10.
+
+echo "Deploying Scala 2.10 version"
+$MVN clean deploy -Prelease,docs-and-source,scala-2.10 -DskipTests -DretryFailedDeploymentCount=10
+