Skip to content

Conversation

@shijinkui
Copy link
Contributor

@shijinkui shijinkui commented Dec 27, 2016

create_release_files.sh is build flink release only. It's hard to build custom local Flink release distribution.
Let create_release_files.sh support:

  1. custom git repo url
  2. custom build special scala and hadoop version
  3. add tools/flink to .gitignore
  4. add usage

for example:

  1. gen GPG key

gpg --gen-key

  1. make local dist
NEW_VERSION=1.2.0 RELEASE_BRANCH=master OLD_VERSION=1.2-SNAPSHOT GPG_PASSPHRASE=shijinkui GPG_KEY=shijinkui IS_LOCAL_DIST=true GIT_REPO=github.com/apache/flink.git ./create_release_files.sh --scala-version 2.11 --hadoop-version 2.7.2
  1. building local dist result
flink-1.2.0-bin-hadoop2x-scala_2.11
flink-1.2.0-bin-hadoop2x-scala_2.11.tgz
flink-1.2.0-bin-hadoop2x-scala_2.11.tgz.asc
flink-1.2.0-bin-hadoop2x-scala_2.11.tgz.md5
flink-1.2.0-bin-hadoop2x-scala_2.11.tgz.sha
flink-1.2.0-src.tgz
flink-1.2.0-src.tgz.asc
flink-1.2.0-src.tgz.md5
flink-1.2.0-src.tgz.sha
  • General

    • The pull request references the related JIRA issue ("[FLINK-5395] support locally build distribution by script create_release_files.sh")
    • The pull request addresses only one issue
    • Each commit in the PR has a meaningful commit message (including the JIRA id)
  • Documentation

    • Documentation has been added for new functionality
    • Old documentation affected by the pull request has been updated
    • JavaDoc for public methods has been added
  • Tests & Build

    • Functionality added by the pull request is covered by tests
    • mvn clean verify has been executed successfully locally or a Travis build has passed

@StephanEwen
Copy link
Contributor

Thank you for this contribution. Looks good at a first glance.

Would be good if @uce or @rmetzger could take a look, they worked mostly with the release script.

Copy link
Contributor

@uce uce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good judging from the code. I had some minor inline comments.

Before merging this, we would definitely have to run the script as well. I did not do this and hence I would wait with merging this.

Maybe @rmetzger can try out the updated script as he is 1.2 release manager?


IS_LOCAL_DIST=${IS_LOCAL_DIST:-false}
GIT_REPO=${GIT_REPO:-git-wip-us.apache.org/repos/asf/flink.git}
scalaV=none
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we rename this to SCALA_VERSION and HADOOP_VERSION in order to follow the style of the other variables?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That' fine.

git checkout master
git branch -D $target_branch -f
} || {
echo "branch $target_branch maybe not found"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the error message should just be branch $target_branch not found without the maybe.

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 [ "$scalaV" == none ] && [ "$hadoopV" != "none" ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add the "..." for all strings to have it consistent?

@shijinkui
Copy link
Contributor Author

shijinkui commented Jan 11, 2017

Before merging this, we would definitely have to run the script as well. I did not do this and hence I would wait with merging this.

@uce @rmetzger I use this script build local distribution successfully. But the apache release have not try.

@rmetzger
Copy link
Contributor

+1 is good to merge.

I'll test it as part of the RC1 for 1.2.0 creation

rmetzger pushed a commit to rmetzger/flink that referenced this pull request Jan 23, 2017
asfgit pushed a commit that referenced this pull request Jan 24, 2017
@asfgit asfgit closed this in 6b55e2c Jan 24, 2017
RELEASE_HASH=`git rev-parse HEAD`
echo "Echo created release hash $RELEASE_HASH"
# local dist have no need to commit to remote
if [ ! IS_LOCAL_DIST ]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Note to myself: This doesn't work)

make_binary_release "hadoop2x" "-Dhadoop.version=$HADOOP_VERSION" "$SCALA_VERSION"
fi

if [ ! IS_LOCAL_DIST ] ; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this as well

@rmetzger
Copy link
Contributor

I fixed the mentioned issues in http://git-wip-us.apache.org/repos/asf/flink/commit/5f0d8c9d

@shijinkui
Copy link
Contributor Author

OK

joseprupi pushed a commit to joseprupi/flink that referenced this pull request Feb 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants