ceph-website-prs: use GH PR number instead of branch name#2631
Open
bluikko wants to merge 1 commit into
Open
Conversation
This PR changes the identifier used for ceph.io sites built from PRs from the branch name to the GitHub PR ID. This identifier is used to create a directory in the file system and is included in the URL to the built site as branchname.ceph.io. This change fixes two problems: 1. Set of characters allowed for git branch names contains characters that are not allowed in directory names or DNS labels. 2. This job adds a comment in the GitHub PR after the build is successful. The comment contains URL to the built site. I did not see an obvious way to modify the branch name in the YAML definition and workarounds might be needed to get the URL to match what is being done in the build script. PR ceph#2579 fixed point 1 for dependabot PRs but missed all other invalid characters such as the ampersand and missed point 2. Sites built from PRs would be at prnumber.ceph.io if this is merged, for example 1234.ceph.io. This assumes the DNS is configured with a wildcard RR and the web server is configured to serve the content from the directory indicated by the left-most DNS label of the request URL without enforcing a specific syntax for the label. Signed-off-by: Ville Ojamo <git2233+ceph@ojamo.eu>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR changes the identifier used for ceph.io sites built from PRs from the branch name to the GitHub PR ID.
This identifier is used to create a directory in the file system and is included in the URL to the built site as branchname.ceph.io.
This change fixes two problems:
PR #2579 fixed point 1 for dependabot PRs but missed all other invalid characters such as the ampersand and missed point 2.
Sites built from PRs would be at prnumber.ceph.io if this is merged, for example 1234.ceph.io. This assumes the DNS is configured with a wildcard RR and the web server is configured to serve the content from the directory indicated by the left-most DNS label of the request URL without enforcing a specific syntax for the label.