Skip to content
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

2.x: Automatically publish the generated JavaDocs from CI #5996

Merged
merged 8 commits into from
May 6, 2018

Conversation

akarnokd
Copy link
Member

@akarnokd akarnokd commented May 5, 2018

This PR adds a script that publishes the generated JavaDocs from CI back to the gh-pages branch upon successful snapshot and release builds (this latter needs testing though via -RC releases).

The snapshot JavaDocs will go into the same directory: http://reactivex.io/RxJava/2.x/javadoc/snapshot/

The release builds update

The push.sh script uses a Travis-CI secured token GITHUB_TOKEN to talk to the GitHub API. This token was created for my account via https://github.com/settings/tokens (requires repo direct push access), and provided to Travis via "Environment variables" on the page https://travis-ci.org/ReactiveX/RxJava/settings .

If, for some reason the publishing fails, the build still counts as successful. The reason for this is that restarting the otherwise successful build will try to reupload the same library version into maven which fails. In this case, the JavaDocs can be updated via the old manual method.

@codecov
Copy link

codecov bot commented May 5, 2018

Codecov Report

Merging #5996 into 2.x will increase coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##                2.x   #5996      +/-   ##
===========================================
+ Coverage     98.25%   98.3%   +0.04%     
- Complexity     6051    6052       +1     
===========================================
  Files           656     656              
  Lines         44078   44078              
  Branches       6118    6118              
===========================================
+ Hits          43311   43330      +19     
+ Misses          231     220      -11     
+ Partials        536     528       -8
Impacted Files Coverage Δ Complexity Δ
...rnal/operators/flowable/FlowableFlatMapSingle.java 92.93% <0%> (-3.81%) 2% <0%> (ø)
...ternal/operators/observable/ObservablePublish.java 96.46% <0%> (-3.54%) 11% <0%> (ø)
.../io/reactivex/disposables/CompositeDisposable.java 98.14% <0%> (-1.86%) 39% <0%> (-1%)
...l/operators/observable/ObservableFlatMapMaybe.java 93.46% <0%> (-1.31%) 2% <0%> (ø)
...perators/single/SingleFlatMapIterableFlowable.java 97.5% <0%> (-0.84%) 2% <0%> (ø)
...ernal/operators/flowable/FlowableFlatMapMaybe.java 94.2% <0%> (-0.49%) 2% <0%> (ø)
...nternal/operators/observable/ObservableCreate.java 98.26% <0%> (ø) 2% <0%> (ø) ⬇️
...x/internal/operators/flowable/FlowablePublish.java 97.44% <0%> (+0.42%) 11% <0%> (ø) ⬇️
...x/internal/operators/flowable/FlowableFlatMap.java 90% <0%> (+0.52%) 4% <0%> (ø) ⬇️
...internal/operators/flowable/FlowableObserveOn.java 97.1% <0%> (+0.57%) 3% <0%> (ø) ⬇️
... and 13 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 90203b6...2dbecc9. Read the comment docs.

@akarnokd
Copy link
Member Author

akarnokd commented May 5, 2018

.travis.yml Outdated
@@ -20,6 +20,7 @@ script: gradle/buildViaTravis.sh
# Code coverage
after_success:
- bash <(curl -s https://codecov.io/bash)
- bash gradle/push.sh
Copy link
Collaborator

Choose a reason for hiding this comment

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

push_javadoc?

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay.

gradle/push.sh Outdated

# commit all
echo -e "commit Travis build: $TRAVIS_BUILD_NUMBER for $buildTag"
git commit --message "Travis build: $TRAVIS_BUILD_NUMBER for $buildTag"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we include in the message that I'll update the documentation?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think there is much ambiguity. These go into the gh-pages tab: https://github.com/ReactiveX/RxJava/tree/gh-pages

@akarnokd akarnokd merged commit 416771e into 2.x May 6, 2018
@akarnokd akarnokd deleted the JavadocAutoPublish branch May 6, 2018 14:31
@akarnokd
Copy link
Member Author

akarnokd commented May 6, 2018

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.

2 participants