Skip to content

Commit

Permalink
Use flags for using legacy/unified docs
Browse files Browse the repository at this point in the history
[noissue]
  • Loading branch information
pedro-psb committed Mar 21, 2024
1 parent 18576ce commit b23e8ae
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
2 changes: 2 additions & 0 deletions plugin-template
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ DEFAULT_SETTINGS = {
"test_reroute": True,
"test_s3": False,
"use_issue_template": True,
"use_unified_docs": False,
"use_legacy_docs": True,
}


Expand Down
11 changes: 11 additions & 0 deletions templates/docs/doc_requirements.txt.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{% include 'header.j2' %}
-r requirements.txt
{%- if use_legacy_docs %}

# Legacy docs
plantuml
sphinx~=7.1.2
sphinx-rtd-theme==1.3.0
Expand All @@ -8,6 +11,14 @@ sphinxcontrib-openapi
towncrier
mistune<4.0.0
Jinja2<3.2
{%- endif %}
{%- if use_unified_docs %}

# Unified docs
pulp-docs @ git+https://github.com/pulp/pulp-docs@main
{%- endif %}
{%- for req in extra_docs_requirements %}

# Extra requirements
{{ req }}
{%- endfor %}
13 changes: 7 additions & 6 deletions templates/github/.github/workflows/scripts/script.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ export PULP_SETTINGS=$PWD/.ci/ansible/settings/settings.py
export PULP_URL="{{ pulp_scheme }}://pulp"

if [[ "$TEST" = "docs" ]]; then
{%- if use_unified_docs %}
# Unified Docs Build
pulp-docs build
{%- endif %}
{%- if use_legacy_docs %}
# Legacy Docs Build
if [[ "$GITHUB_WORKFLOW" == "{{ plugin_app_label | camel | default("Pulp") }} CI" ]]; then
towncrier build --yes --version 4.0.0.ci
fi
Expand All @@ -34,12 +40,7 @@ if [[ "$TEST" = "docs" ]]; then
if [ -f "$POST_DOCS_TEST" ]; then
source "$POST_DOCS_TEST"
fi
exit
fi

if [[ "$TEST" = "new_docs" ]]; then
pip install --user git+https://github.com/pulp/pulp-docs
pulp-docs build
{%- endif %}
exit
fi

Expand Down
1 change: 0 additions & 1 deletion templates/github/.github/workflows/test.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ jobs:
- TEST: pulp
{%- if docs_test %}
- TEST: docs
- TEST: new_docs
{%- endif %}
{%- if test_azure %}
- TEST: azure
Expand Down

0 comments on commit b23e8ae

Please sign in to comment.