New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ZEPPELIN-986] Create publish release script #994
Conversation
CI failiure is unrelated. Looks good to me |
|
||
# Using Nexus API documented here: | ||
# https://support.sonatype.com/hc/en-us/articles/213465868-Uploading-to-a-Staging-Repository-via-REST-API | ||
echo "Creating Nexus staging repository" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall this be extracted to a function
, how do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we make it as function, this function should return value staged_repo_id
which is not supported in bash. I know there is tricky way to handle it, but not sure how beneficial it would be since this will be used only once in a script. What do you think?
Looks great, I think there are just few things left:
@minahlee if we want to remove |
cd "${WORKING_DIR}/zeppelin" | ||
|
||
# Force release version | ||
mvn versions:set -DnewVersion="${RELEASE_VERSION}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bzz this is where pom.xml is changed :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing it out!
why spark is not published. is it related to the assembly? Btw, spark 2 doesn't use assembly any more and favor dependencies in separate jars. See https://issues.apache.org/jira/browse/SPARK-11157 for more details. |
file_short="$(echo "${file}" | sed -e 's/\.\///')" | ||
dest_url="${nexus_upload}/org/apache/zeppelin/$file_short" | ||
echo " Uploading ${file_short}" | ||
curl -u "${ASF_USERID}:${ASF_PASSWORD}" --upload-file "${file_short}" "${dest_url}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we do not use -e
flag for this scripts (which sounds good to me), shall not we check return of, at least, network-related commands?
This way we could make sure that if it have failed due to networking reasons, we print to the user meaningful error conditions and let him then re-run the script?
@minahlee Great, I think if checking error conditions could be added to network-related commands - it would be even more awesome, as this is quite common failure pattern. Other then that, looks great to me and thank you for automating this. @echarles Looking at this line I was under impression that it's only zeppelin-server and zeppelin-distribution that is not published here.. As 2 release scripts share the same lines of build setup - it can be error-prone to modify it in both places, in case something needs to be added to release. @minahlee shall we keep it in the file and read from there in both scripts, or shall we define it in third one |
@echarles I think my description caused confusion. Spark will be included in release since most of Zeppelin user is based on Spark. The modules I wrote in description is skipped modules for publish and Spark always hasn't been skipped from release. |
Didn't look at the code... just saw in the description (and @minahlee just confirmed it would be published). Thinking more about this PR:
|
Thank you for the feedback @echarles ! I think it should be fine to add missing bits, as soon as they are identified and there is somebody with actual use case for it later on. Would you be willing to log it as a JIRA issue? As person who did release management for Zeppelin before - I had no troubles with release plugin, although calling it multiple times with different arguments, instead of single script was quite error prone. If a manager for a current release though wants to try another solution and provides a robust one (as in this PR) - it should be fine, especially given that we can always get back to the plugins if desired. |
Good to hear the release plugin is working fine. The release manager is responsible for the tools he wants. Fine to me if it is a script or a plugin, but at the end the artifacts must find their way to maven central. For this PR, is it possible to ensure |
And for the record, Zeppelin artifacts have not published 0.5.5, 0.5.6 to maven repository, but I am not sure if it is deploy plugin issue or not.
|
@minahlee thx for this precision and context. |
@echarles If there are such needs, nothing stops us from publishing it. I will make change accordingly. Thank you for sharing your situation. |
@minahlee Great! I think it should be ready to merge as soon as issues highlighted above a. failing networking are addressed |
@bzz Sorry for late response, I am working on it and going to push commits by today. Thanks for heads up :) |
Looks awesome to me, thank you @minahlee ! 2 minor things are a bit confusing:
|
@bzz Thanks for the review. I removed mistakenly pushed file. |
@minahlee Here's related issues why geode and scalding is not in maven publish script. Geode - https://issues.apache.org/jira/browse/ZEPPELIN-375 Please take a look. To include them, bin_license/LICENSE file need to be updated with their transitive dependencies(geode, scalding interpreter), and remove 3rd party repository (scalding interpreter) |
This reverts commit a88bc1d.
@Leemoonsoo Thanks for pointing it out! I reverted commit of adding geode, scalding |
Got it, thank for reminding! Let's merge this guy then. Any 👍 or 👎 ? |
Merge if there is no more discussion |
### What is this PR for? This PR is to automate release publish to maven repository. We used to use maven-deploy-plugin and maven-release-plugin for release but somehow it didn't work well with Zeppelin so 0.5.5 and 0.5.6 haven't been published to maven repository. Publishing release to maven repository will eventually help zeppelin to reduce binary package size by leading users to use Dynamic interpreter loading(#908). Originally below modules were skipped for maven release - all interpreters(except spark) - zeppelin-display - zeppelin-server - zeppelin-distribution on the other hand this pr will skip only: - zeppelin-distribution ### What type of PR is it? Infra ### Todos - [x] Include SparkR/R interpreter in release - [x] Create common_release.sh to remove build configuration duplication - [x] Check curl networking failure ### What is the Jira issue? [ZEPPELIN-986](https://issues.apache.org/jira/browse/ZEPPELIN-986) ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? Yes, https://cwiki.apache.org/confluence/display/ZEPPELIN/Preparing+Zeppelin+Release will be updated accordingly once this pr is merged. Author: Mina Lee <minalee@apache.org> Closes #994 from minahlee/ZEPPELIN-986 and squashes the following commits: b0e8e67 [Mina Lee] Revert "Add geode, scalding profile in maven artifact build" cd4cbcd [Mina Lee] curl failure check c0ea07c [Mina Lee] Fix wrong indentation a88bc1d [Mina Lee] Add geode, scalding profile in maven artifact build 2cced61 [Mina Lee] Add r to binary package and maven build 903bc12 [Mina Lee] Move duplicate code to common_release.sh a3eb676 [Mina Lee] Include zeppelin-server module in publish artifiact 48d338f [Mina Lee] Rollback mistakenly removed plugin aafaf42 [Mina Lee] Follow google shell style guide 30dcc65 [Mina Lee] remove deploy plugin from pom since custom script will be used instead for deploy cd1f08c [Mina Lee] Refactor create release script e764f5f [Mina Lee] Add maven publish release script (cherry picked from commit 85d7057) Signed-off-by: Mina Lee <minalee@apache.org>
What is this PR for?
This PR is to automate release publish to maven repository.
We used to use maven-deploy-plugin and maven-release-plugin for release but somehow it didn't work well with Zeppelin so 0.5.5 and 0.5.6 haven't been published to maven repository.
Publishing release to maven repository will eventually help zeppelin to reduce binary package size by leading users to use Dynamic interpreter loading(#908).
Originally below modules were skipped for maven release
on the other hand this pr will skip only:
What type of PR is it?
Infra
Todos
What is the Jira issue?
ZEPPELIN-986
Questions: