Skip to content

Commit

Permalink
Add unified docs-ci
Browse files Browse the repository at this point in the history
Related to: pulp/pulp-docs#31

[noissue]
  • Loading branch information
pedro-psb authored and mdellweg committed Apr 17, 2024
1 parent a29c4b1 commit 44b3298
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 31 deletions.
34 changes: 5 additions & 29 deletions .ci/scripts/check_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,35 +82,11 @@ def main():
f"{last_tag}", f"origin/{branch}", "--name-only", "--", "requirements.txt"
)
if z_changelog or req_txt_diff:
# Blobless clone does not have file contents for Z branches,
# check commit message for last Z bump
git_branch = f"origin/{branch}"
next_version = None
bump_commit = repo.git.log(
"--oneline",
"--grep=Bump version",
"-n 1",
git_branch,
"--",
".bumpversion.cfg",
)
if bump_commit:
next_version = bump_commit.split("→ ")[-1]
# If not found - try old-commit-msg
if not next_version:
bump_commit = repo.git.log(
"--oneline",
"--grep=Bump to",
"-n 1",
git_branch,
"--",
".bumpversion.cfg",
)
next_version = bump_commit.split("to ")[-1] if bump_commit else None

# You could, theoretically, be next_vers==None here - but that's always
# been true for this script.
next_version = Version(next_version)
curr_version = Version(last_tag)
assert curr_version.base_version.startswith(
branch
), "Current-version has to belong to the current branch!"
next_version = Version(f"{branch}.{curr_version.micro + 1}")
reason = "CHANGES" if z_changelog else "requirements.txt"
print(
f"A Z-release is needed for {branch}, "
Expand Down
2 changes: 1 addition & 1 deletion .github/template_gitref
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2021.08.26-326-ge5addc7
2021.08.26-327-g6a0d984
2 changes: 2 additions & 0 deletions .github/workflows/scripts/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ if [[ "$TEST" = "docs" ]]; then
if [[ "$GITHUB_WORKFLOW" == "Core CI" ]]; then
towncrier build --yes --version 4.0.0.ci
fi
# Unified Docs Build
pulp-docs build
# Legacy Docs Build
cd docs
make PULP_URL="$PULP_URL" diagrams html
Expand Down
1 change: 1 addition & 0 deletions CHANGES/+new-docs-ci.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added the Unified Docs CI build-check on PRs.
2 changes: 2 additions & 0 deletions doc_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ sphinxcontrib-openapi
mistune<4.0.0
Jinja2<3.2
# Extra requirements
# Unified docs
pulp-docs @ git+https://github.com/pulp/pulp-docs@main
2 changes: 1 addition & 1 deletion template_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,5 @@ test_reroute: true
test_s3: true
use_issue_template: true
use_legacy_docs: true
use_unified_docs: false
use_unified_docs: true

0 comments on commit 44b3298

Please sign in to comment.