Checkout v4 does some strange mangling of tags, basically overwrites our
signed/annotated tag with something like:
/usr/bin/git -c protocol.version=2 fetch --no-tags --prune \
--no-recurse-submodules origin \
+2e93c3fd478b6631dd7bda9c6ec66a9f99cafaa8:refs/tags/v0.16.0
Which breaks our gh-pages build on release branches/tags.
This reverts commit 130ef1070d.
No need to (re-)build documentation when a release is published.
Great simplification of the Helm repo index update script: do not scan
all releases but just get the assets from the release that was
published.
This separation should make the maintenance of scripts and workflows
easier.
Ensure sequential updates to the gh-pages branch. Otherwise, if parallel
jobs are triggered, onnly one (the first to complete) will succeed and
the others will fail with git push error (because the tip of the
gh-pages has moved and their commit doesn't apply anymore).
Make the update-gh-pages.sh script to maintain a Helm charts repository
under charts/ subdirectory in gh-pages. The script now (always) scans
throught all release assets and injects any found Helm chart archives
into the Helm repo. In practice, new assets in all Github releases are
scanned and the Helm repo is updated on any update of the master or
release branches or on any new tags. Asset ids are tracked/cached in
order to avoid unnecessary downloads, but also, to capture any changes
in assets that were already merged in the repo index.
After this a user is able to do something like
$ helm repo add nfd http://kubernetes-sigs.github.io/node-feature-discovery/charts
...
$ helm repo update
...
$ helm install nfd/node-feature-discovery --namespace nfd --create-namespace --generate-name
...
Only update documentation if the version has been released (i.e. a git
tag corresponding the version we're updating exists) or it is for the
master branch. Prevents us from pointing users to documentation of an
unreleased version.
Also updates github workflow to fetch full commit history (including
tags) so that git describe works correctly.
Add 'scripts/github/update-gh-pages.sh' for updating gh-pages branch.
This new script intended for github actions integration and builds the
html documentation from the currently checked-out commit and updates the
corresponding version subfolder in the gh-pages branch. The version is
taken from GITHUB_REF environment variable and defaults to 'master' if
the env var is empty. For testing purposes or manual updates the
subfolder can also be given directly as a command line argument.
Add 'scripts/test-infra/build-gh-pages.sh' for verifying that site
(gh-pages) builds successfully. This is intended for integration with
kubernetes test-infra.
Finally, add Github workflow for updating gh-pages. This job is run on
master and release branches plus all tags starting with letter 'v'.