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

Read manifest from GitHub url or the file system #120

Merged
merged 2 commits into from
Nov 20, 2020
Merged

Conversation

g-pavlov
Copy link
Contributor

What this PR does / why we need it:

  • Makes use of the configured resource handlers used also by the reactor to read a resources. The order is the same as in the reactor - first the FS handlers is applied and if it doesn't accept the URI we move on to the GitHub implementation.
  • config.go was renamed to manifest.go to reflect better its purpose.
  • Also a problem was found with GitHub resource handlers failing with NPE for invalid paths provided to their Accept method and this was fixed.

To test:
docforge -d /tmp/docforge-docs -f https://github.com/gardener/documentation/blob/master/.docforge/documentation.yaml --github-oauth-token $GITHUB_TOKEN
and
docforge -d /tmp/docforge-docs -f ../documentation/.docforge/documentation.yaml --github-oauth-token $GITHUB_TOKEN
(assuming ../documentation/.docforge/documentation.yaml is valid path to the same manifest on your local file system)
shall yield the same result.

Which issue(s) this PR fixes:
Fixes #71

Release note:

GitHub URLs are now supported as manifest path flag (`-f`/`--manifest`) arguments, in addition to (local) file system file paths. The `--github-oauth-token-map` and `--github-oauth-token` flags arguments are used to apply authentication token to the request when fetching manifest from a GitHub URL.

@g-pavlov g-pavlov added the component/documentation Gardener Documentation label Nov 19, 2020
@g-pavlov g-pavlov self-assigned this Nov 19, 2020
@gardener-robot gardener-robot added needs/review Needs review size/m Size of pull request is medium (see gardener-robot robot/bots/size.py) labels Nov 19, 2020
@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Nov 19, 2020
@g-pavlov g-pavlov changed the title Read manifest from url or fs Read manifest from GitHub url or the file system Nov 19, 2020
@gardener-robot-ci-2 gardener-robot-ci-2 added needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Nov 19, 2020
@gardener-robot-ci-3 gardener-robot-ci-3 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Nov 19, 2020
@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Nov 19, 2020
@g-pavlov
Copy link
Contributor Author

/ok-to-test

@gardener-robot gardener-robot added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Nov 20, 2020
@g-pavlov g-pavlov merged commit d83c185 into master Nov 20, 2020
@g-pavlov g-pavlov deleted the urlmanifestpath branch November 20, 2020 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/documentation Gardener Documentation needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/review Needs review reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) size/m Size of pull request is medium (see gardener-robot robot/bots/size.py)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use URL in manifest file path
4 participants