-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add travis-ci style pull request builder #1340
Comments
We do this with a jenkins builder right now on pyca/cryptography but if we could get it straight through RTD that would be wonderful. |
This is on our radar, but we need to make some design decisions around how to handle arbitrary HTML uploads without allowing completely arbitrary HTML uploads. Closing this as a duplicate of some bug I know exists and I'll find later :) |
This isn't an arbitrary HTML upload ticket, it's a request to auto-build branches from PR's of projects that we know about. It's definitely something we should be doing. |
The ticket description here seemed to describe building docs on Travis. Reopening this as we are describing a Github/Bitbucket pull request integration. There are some design decisions that would be required here. Namely, how to handle pull requests from branches on forks given our currnet data model. We could easily support branches pushed to the repo we know about by expanding the webhook to handle PR open/update. |
This ticket isn't about building docs on travis; it's about building docs in the style of travis. That is, on every push for a PR, build the docs and link them so people can browse. |
If we could set up webhooks to tell readthedocs to build docs for pull requests that touch documentation, that would be ideal. Currently when a pull request comes in that touches documentation, we have two distinctly distasteful options:
|
I agree this makes a lot of sense. We need to implement some kind of "temporary" version that would map to the PR, and clone from the remote repository sending the PR. Then we'd need to delete the version when the branch got merged, but I agree this would be quite useful. |
ericholscher: I think those can all be done based on data from the github webhooks, but I've no idea where the implementing code would live.I suppose it would be a new endpoint for the rtfd site? |
I saw that the build was failing, hence this is my attempt to fix it, altough I don't know how to test this before merging it. See https://readthedocs.org/projects/luigi/builds/4189801/ Unfortunately I couldn't find a way to connect a webhook between GitHub PRs and readthedocs: readthedocs/readthedocs.org#1340 The reason I believe a version bump would fix it is because I see exactly the same error as in sphinx-doc/sphinx#2465 and readthedocs seem to use 1.3.5, causing the pdf docs to be outdated.
I saw that the build was failing, hence this is my attempt to fix it, altough I don't know how to test this before merging it. See https://readthedocs.org/projects/luigi/builds/4189801/ Unfortunately I couldn't find a way to connect a webhook between GitHub PRs and readthedocs: readthedocs/readthedocs.org#1340 The reason I believe a version bump would fix it is because I see exactly the same error as in sphinx-doc/sphinx#2465 and readthedocs seem to use 1.3.5, causing the pdf docs to be outdated.
Blocked on #2465 |
I don't know how the GitHub API works for this case, but I think this feature #872 could be used for this |
Any news on this? I do build sphinx docs with Travis on multiple projects but it seems that even if building docs with travis may succeed, it may not succeed on RTD, causing more trouble. As I find much easier to build docs myself, fully integrated into CI pipeline, I am starting to wonder what are the real benefits of using RTD in this case, as it seems to be a PITA. Did anyone managed to find a workaround that would prevent people from merging PRs that would break building RTD documentation? |
@ssbarnea this is what you get from rtd for free 😉 https://docs.readthedocs.io/en/latest/features.html I'm not sure how this feature would be integrated (rtd would have a lot of temporal docs), you can have something like this for checking your builds And maybe using |
I would like to use this in combination with protected branches and status checks, so that PRs can only be merged if they do NOT break the building process on RTD. |
to whom it may concern, I created a GitHub Probot app that enables RTD build and share its document URL in PR. It may cover a part of your requirements, please check. |
Interestingly, travis does it using the git aliases also: https://travis-ci.org/rtfd/readthedocs.org/jobs/482572527#L418 |
This feature is accepted and we plan to do it. Our plan is to do this after all build artifacts are stored in blob storage (see #5549 for a start on that) because this change will significantly increase our storage requirements as RTD would be storing build output for every PR docs build indefinitely. This will become higher priority in the latter half of 2019. |
That's wonderful to hear! If you ever want a beta tester, don't hesitate to holler! |
Since ReadTheDocs does not support [1] running as a CI check on GitHub yet, let's make sure that we at least run sphinx. This would have caught a recent docs breakage (see parent commit). [1] readthedocs/readthedocs.org#1340
Since ReadTheDocs does not support [1] running as a CI check on GitHub yet, let's make sure that we at least run sphinx. This would have caught a recent docs breakage (see parent commit). [1] readthedocs/readthedocs.org#1340
We have this feature in beta https://blog.readthedocs.com/building-docs-for-pull-requests/ |
Going to call this one closed, as it's now in the codebase. We will slowly roll it out, but it's done 👍 |
What are the steps for setting this up for a repo currently? |
@jakirkham you mean locally or on the site? On the site you need to request a beta access https://blog.readthedocs.com/building-docs-for-pull-requests/ For a local installation you need to enable this flag for your projects https://docs.readthedocs.io/en/stable/guides/feature-flags.html You can do this from the admin of |
Thanks for the detailed answer. Was meaning the site. Didn't know if things had changed in the past few months. |
Since I find this issue faster than the docs: https://docs.readthedocs.io/en/stable/guides/autobuild-docs-for-pull-requests.html |
It'd be amazing for helping review documentation if RTD has a travis-ci pull request builder. It could watch for PRs/pushes, build docs for them, and then link them in the build status.
/cc @reaperhulk
The text was updated successfully, but these errors were encountered: