Skip to content
This repository has been archived by the owner on Sep 19, 2021. It is now read-only.

[RFC] Build reports independently and in parallel. #13

Merged
merged 2 commits into from
Aug 20, 2014

Conversation

fwalch
Copy link
Member

@fwalch fwalch commented Aug 20, 2014

#12 actually didn't comprise that many changes, so I went ahead and implemented it to see if/how it works in reality.

You can see the result at https://github.com/fwalch/doc2/commits/gh-pages (only commits from Aug 20 are relevant). This is the output of two builds, one is at https://travis-ci.org/fwalch/bot-ci/builds/33041843. Note that there is no commit for doc-index (pull index.html from neovim.org/doc_index), because that file didn't change at all.

The only thing I'm not too happy about is the very last line of publish-reports.sh:

until (git pull --rebase origin ${DOC_BRANCH} && git push https://${GH_TOKEN}@github.com/${DOC_REPO} ${DOC_BRANCH}); do echo "Pushing to ${DOC_REPO}."; sleep 1; done

Force-pushing will push the full local history, not just the last commit, so I think there is no other way than to update the local clone before pushing. I hope that this is an acceptable "hack", however.

@fwalch fwalch changed the title [RFC] Independent reports. [RFC] Build reports independently and in parallel. Aug 20, 2014
@fwalch fwalch mentioned this pull request Aug 20, 2014
26 tasks
@@ -1,3 +1,5 @@
DOC_SUBTREE="/build-reports/translations/"
Copy link
Member

Choose a reason for hiding this comment

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

Let's bite the bullet and change these URLs to /reports/foo/. I'll update the website once this is merged.

Copy link
Member Author

Choose a reason for hiding this comment

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

If I only change this here, there will be both build-reports and reports directories in neovim/doc. Created neovim/doc#1 to take care of that.

Copy link
Member

Choose a reason for hiding this comment

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

Good catch

git commit -m "Documentation: Automatic update."
git push --force https://${GH_TOKEN}@github.com/${DOC_REPO} ${DOC_BRANCH}
git commit -m "${REPORT//-/ }: Automatic update." || true # if there are no changes, git commit returns with a non-zero exit code
until (git pull --rebase origin ${DOC_BRANCH} && git push https://${GH_TOKEN}@github.com/${DOC_REPO} ${DOC_BRANCH}); do echo "Pushing to ${DOC_REPO}."; sleep 1; done
Copy link
Member

Choose a reason for hiding this comment

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

Correct me if I'm wrong, but I think this will only echo "Pushing to ${DOC_REPO}." once (or none). The git pull will block until it is finished.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I get it now, this is in case it fails :)

@justinmk
Copy link
Member

#12 actually didn't comprise that many changes

Indeed, this is much simpler than I expected. Very nice!

Force-pushing will push the full local history, not just the last commit, so I think there is no other way than to update the local clone before pushing. I hope that this is an acceptable "hack",

No problem, we'll go with that for now.

@justinmk
Copy link
Member

One last request: could you add a quick example to README.md that shows how to run a single script locally:

REPORT=vimpatch-report ./publish-docs.sh

@fwalch
Copy link
Member Author

fwalch commented Aug 20, 2014

Sure! Just as an aside, I'll try to simplify this to ./ci/generate-doxygen.sh in a later PR.

@fwalch
Copy link
Member Author

fwalch commented Aug 20, 2014

I think I addressed all of your comments. Also changed the logo link to / (instead of .), since you mentioned that in the style guide PR and I was already doing the build-reports renaming in here as well. I shouldn't have squashed all of that into one commit, though..

@fwalch
Copy link
Member Author

fwalch commented Aug 20, 2014

Split into two commits.

@fwalch
Copy link
Member Author

fwalch commented Aug 20, 2014

Build is here, output in fwalch/doc2. If there are no more comments, I'd say this is ready (neovim/doc#1 needs to be merged first!).

@justinmk
Copy link
Member

Indeed! Need to update links in https://github.com/neovim/neovim.github.io/blob/master/doc_index.html

Planning to do that tonight, didn't want to bug you about it.

@fwalch
Copy link
Member Author

fwalch commented Aug 20, 2014

@justinmk Had another spare minute, see neovim/neovim.github.io#68 :-)

justinmk added a commit that referenced this pull request Aug 20, 2014
Build reports independently and in parallel.
@justinmk justinmk merged commit 6a29d78 into neovim:master Aug 20, 2014
@justinmk
Copy link
Member

😎

@fwalch
Copy link
Member Author

fwalch commented Aug 20, 2014

Thanks @justinmk!

@fwalch fwalch deleted the independent-reports branch August 20, 2014 19:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants