Skip to content

ceph-website-prs: use GH PR number instead of branch name#2631

Open
bluikko wants to merge 1 commit into
ceph:mainfrom
bluikko:website-use-pr-id
Open

ceph-website-prs: use GH PR number instead of branch name#2631
bluikko wants to merge 1 commit into
ceph:mainfrom
bluikko:website-use-pr-id

Conversation

@bluikko

@bluikko bluikko commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

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 #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.

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>
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.

1 participant