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

Automate repository docs inclusion #1762

Merged
merged 1 commit into from
Oct 14, 2020
Merged

Automate repository docs inclusion #1762

merged 1 commit into from
Oct 14, 2020

Conversation

grobie
Copy link
Member

@grobie grobie commented Oct 14, 2020

So far every prometheus/alertmanater/... release branch had to be
manually configured in the nanoc.yaml config file. With this change the
most recent release branches will be checked out automatically if a
corresponding semver tag exists.

As the Prometheus git repository includes several hundreds of megabytes
of vendored assets, the repository is cloned bare and all blobs are
filtered by default. Each version is then checked out in an individual
working tree and git's spare-chekcout feature is used to reduce the
checkout to the docs/ folder. The git data is cached in
tmp/repo_docs/ and will be recreated automatically if removed.

Signed-off-by: Tobias Schmidt [email protected]

Fixes #1702.

Copy link
Member

@juliusv juliusv left a comment

Choose a reason for hiding this comment

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

👍 Awesome, thanks! I didn't analyze every nanoc code bit in full detail, but the site seems to work great and the overall changes look and sound amazing as well. Yay for bare repos and sparse checkouts!

So far every prometheus/alertmanater/... release branch had to be
manually configured in the nanoc.yaml config file. With this change the
most recent release branches will be checked out automatically if a
corresponding semver tag exists.

As the Prometheus git repository includes several hundreds of megabytes
of vendored assets, the repository is cloned bare and all blobs are
filtered by default. Each version is then checked out in an individual
working tree and git's spare-chekcout feature is used to reduce the
checkout to the `docs/` folder. The git data is cached in
`tmp/repo_docs/` and will be recreated automatically if removed.

Signed-off-by: Tobias Schmidt <[email protected]>
@grobie grobie force-pushed the grobie/simpler-repo-docs branch from 6c15e63 to dbac781 Compare October 14, 2020 17:55
@grobie
Copy link
Member Author

grobie commented Oct 14, 2020

Note that the previous implementation already used sparse-checkouts. But git's new partialclonefilter = blob:none wasn't available back then, so I used depth=1 and individual checkouts. That doesn't work particularly well when also fetching tags/branches though. With the new approach only one git repo is necessary for all versions which should be dramatically faster on slower connections (not really relevant for netlify builds though obviously).

@juliusv
Copy link
Member

juliusv commented Oct 14, 2020

👍 nice!

@grobie grobie merged commit ef4e611 into master Oct 14, 2020
@grobie grobie deleted the grobie/simpler-repo-docs branch October 14, 2020 18:04
@roidelapluie
Copy link
Member

Thanks!!!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automatically generate releases numbers
3 participants