-
Notifications
You must be signed in to change notification settings - Fork 185
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
Exposing rendered manuscripts from pull request builds #198
Comments
To learn more about our options, should we test an alternative CI service? CircleCI supports artifacts. That wouldn't provide the complete solution we are looking for. It may provide a quick short term workaround to the specific problem of reviewing rendered manuscripts for a PR. |
I would be interested to see what an operational |
I tested building a manuscript with AppVeyor, which supports build artifacts in pull requests, to assess how much that would help. agitter/my-manuscript#4 provides a rough demonstration. The overall strategy is to continue using Travis CI for deployment and use a parallel build on AppVeyor to store a copy of the updated
I haven't tested whether this works if the pull request originates from a different GitHub fork. @dhimmel do you think I should continue exploring this option or the equivalent with CircleCI? If we add Storing a PDF of a rendered diff would work similarly. We would only need to extend the build script to generate it. |
It is not ideal to have to use two CI services like this, but it is the best solution we have so far for build artifacts. I am on board with making it an optional step in The other option is to switch to GitLab, but I think that could diminish project visibility and broad participation in manuscripts. On the other hand, it's closer to open source and has several design improvements over GitHub. |
I could pull out most of the duplicate I believe we would need to keep the Moving the AppVeyor config file to the Another related note is the Manubot currently only adds CI build metadata for Travis CI builds. We could generalize that for multiple CI services. That would be very low priority and may not be necessary. We may want to eventually switch to GitLab. That decision would have more widespread impact so I'd like to do more internal testing first. Ideally we could give Manubot users the choice of GitHub or GitLab, but we would need to consider how much that increases our maintenance burden. |
No I don't think so. I haven't figured out meaningful differences between install and before_install besides potentially for some install-specific behavior that we don't use (source):
Yes, some duplication should be fine. It would be nice to keep things miniconda version to a single script.
Yes this is a good idea that I can do if we go forward with AppVeyor: the artifacts combined with notifications makes me think we should. One weird aspect IIRC is that appveyor does not use the github organization for its URLs but instead uses username from a separate account. If the purpose of AppVeyor is only artifacts / notifications on PRs, should we see if we can have it run only on PRs? |
Checking the @agitter seems like we should move forward with a rootstock pull request with your solution. |
Yes, that sounds familiar. I believe you figured out how to set that up for the
AppVeyor also runs on the Despite these limitations, I'll move ahead with a rootstock pull request in the next few days. |
But our commit messages on the output branch include
Does the |
Per the these docs
Do we want to append
Yes, that should work, but I haven't tested it. I meant that I hadn't found a way to only run AppVeyor on pull requests through the |
I tested |
Merges #262 References #198 Add an AppVeyor continuous integration file to enable manuscript build previews in pull requests. AppVeyorBot comments in pull requests with a link to the latest manuscript PDF. Move shared continuous integration steps to an install script. Change the continuous integration skip message in the deploy script to work across multiple continuous integration services.
This build is based on bc094bd. This commit was created by the following Travis CI build and job: https://travis-ci.com/manubot/rootstock/builds/122622628 https://travis-ci.com/manubot/rootstock/jobs/223977466 The full commit message that triggered this build is copied below: Add AppVeyor pull request previews Merges #262 References #198 Add an AppVeyor continuous integration file to enable manuscript build previews in pull requests. AppVeyorBot comments in pull requests with a link to the latest manuscript PDF. Move shared continuous integration steps to an install script. Change the continuous integration skip message in the deploy script to work across multiple continuous integration services.
This build is based on bc094bd. This commit was created by the following Travis CI build and job: https://travis-ci.com/manubot/rootstock/builds/122622628 https://travis-ci.com/manubot/rootstock/jobs/223977466 The full commit message that triggered this build is copied below: Add AppVeyor pull request previews Merges #262 References #198 Add an AppVeyor continuous integration file to enable manuscript build previews in pull requests. AppVeyorBot comments in pull requests with a link to the latest manuscript PDF. Move shared continuous integration steps to an install script. Change the continuous integration skip message in the deploy script to work across multiple continuous integration services.
I am going to close this issue now that we have AppVeyor configured to post artifacts of the manuscript PDF. Further discussion can happen below or in new issues. Also linking a Twitter thread on whether GitHub Actions would support PR artifacts. We don't have a conclusive indication at the moment. |
|
Merges manubot/rootstock#262 References manubot/rootstock#198 Add an AppVeyor continuous integration file to enable manuscript build previews in pull requests. AppVeyorBot comments in pull requests with a link to the latest manuscript PDF. Move shared continuous integration steps to an install script. Change the continuous integration skip message in the deploy script to work across multiple continuous integration services.
Please forgive the crudity of my method, but I took the route of creating an alternative workflow step that simply deploys the "webpage" artifacts from the PR to a subdirectory of the gh-pages branch, which then gets served automatically, e.g. |
That's a cool approach. Is your manuscript public so we could see how you did it? It might make sense to tweak the directory structure a bit like The main problem with this approach is that it will only work for PRs from users with write access I believe (or maybe PRs from a branch in the same repo). If an external user tries to make a pull request from a branch on their fork, this will fail... which might be okay, but just it won't work for all PRs.
we do upload artifacts for GitHub Actions that contain the rendered manuscript... just they're annoying to access because you have to go the actions page and click artifacts. |
Great pointers! Many thanks @dhimmel
Proof of concept: |
Merges manubot/rootstock#262 References manubot/rootstock#198 Add an AppVeyor continuous integration file to enable manuscript build previews in pull requests. AppVeyorBot comments in pull requests with a link to the latest manuscript PDF. Move shared continuous integration steps to an install script. Change the continuous integration skip message in the deploy script to work across multiple continuous integration services.
Currently, rendered manuscripts created by pull request builds, such as
output/manuscript.html
andoutput/manuscript.pdf
, are never exposed. Instead they disappear with the ephemeral build environment.Exposing rendered manuscripts (and ideally a rendered diff, see #54) would make review of pull requests easier. For example, currently we don't know how a citation will render until we merge the PR (or test it locally). Nor do we know if formatting syntax will work as intended. The point has also been brought up by a reviewer of the manubot manuscript in greenelab/meta-review#121.
The main issue blocking us is that pull requests on Travis cannot access secure environment variables due to their unauthenticated nature. This limitation is discussed at travis-ci/travis-ci#5579. Possibly there are workarounds or alternatives to using PR build artifacts.
The text was updated successfully, but these errors were encountered: