2.x: Automatically publish the generated JavaDocs from CI by akarnokd · Pull Request #5996 · ReactiveX/RxJava · GitHub
Skip to content

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

Merged
akarnokd merged 8 commits into
2.xfrom
JavadocAutoPublish
May 6, 2018
Merged

2.x: Automatically publish the generated JavaDocs from CI#5996
akarnokd merged 8 commits into
2.xfrom
JavadocAutoPublish

Conversation

@akarnokd

@akarnokd akarnokd commented May 5, 2018

Copy link
Copy Markdown
Member

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

codecov Bot commented May 5, 2018

Copy link
Copy Markdown

@akarnokd

akarnokd commented May 5, 2018

Copy link
Copy Markdown
Member Author

Comment thread .travis.yml Outdated
# Code coverage
after_success:
- bash <(curl -s https://codecov.io/bash)
- bash gradle/push.sh

Copy link
Copy Markdown
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
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Okay.

Comment thread gradle/push.sh

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

Copy link
Copy Markdown
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
Copy Markdown
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

akarnokd commented May 6, 2018

Copy link
Copy Markdown
Member Author

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