Compare commits
4 Commits
actions-gi
...
main
Author | SHA1 | Date | |
---|---|---|---|
76cac820ae | |||
8c9ca536e8 | |||
62d7563010 | |||
1ed083a057 |
@ -2,10 +2,10 @@
|
|||||||
hc_location: devg/apig
|
hc_location: devg/apig
|
||||||
html_location: docs/apig/dev
|
html_location: docs/apig/dev
|
||||||
link: /api-gateway/dev-guide/
|
link: /api-gateway/dev-guide/
|
||||||
rst_location: dev_guide/source
|
rst_location: doc/dev-guide/source
|
||||||
service_type: apig
|
service_type: apig
|
||||||
title: Developer Guide
|
title: Developer Guide
|
||||||
type: dev
|
type: dev-guide
|
||||||
cloud_environments:
|
cloud_environments:
|
||||||
- name: eu_de
|
- name: eu_de
|
||||||
visibility: hidden
|
visibility: hidden
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
hc_location: devg/as
|
hc_location: devg/as
|
||||||
html_location: docs/as/dev
|
html_location: docs/as/dev
|
||||||
link: /auto-scaling/dev-guide/
|
link: /auto-scaling/dev-guide/
|
||||||
rst_location: dev_guide/source
|
rst_location: doc/dev-guide/source
|
||||||
service_type: as
|
service_type: as
|
||||||
title: Developer Guide
|
title: Developer Guide
|
||||||
type: dev
|
type: dev-guide
|
||||||
cloud_environments:
|
cloud_environments:
|
||||||
- name: eu_de
|
- name: eu_de
|
||||||
visibility: public
|
visibility: public
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
hc_location: devg/bms
|
hc_location: devg/bms
|
||||||
html_location: docs/bms/dev
|
html_location: docs/bms/dev
|
||||||
link: /bare-metal-server/dev-guide/
|
link: /bare-metal-server/dev-guide/
|
||||||
rst_location: dev_guide/source
|
rst_location: doc/dev-guide/source
|
||||||
service_type: bms
|
service_type: bms
|
||||||
title: Developer Guide
|
title: Developer Guide
|
||||||
type: dev
|
type: dev-guide
|
||||||
cloud_environments:
|
cloud_environments:
|
||||||
- name: eu_de
|
- name: eu_de
|
||||||
visibility: public
|
visibility: public
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
hc_location: devg/dli
|
hc_location: devg/dli
|
||||||
html_location: docs/dli/dev
|
html_location: docs/dli/dev
|
||||||
link: /data-lake-insight/dev-guide/
|
link: /data-lake-insight/dev-guide/
|
||||||
rst_location: dev_guide/source
|
rst_location: doc/dev-guide/source
|
||||||
service_type: dli
|
service_type: dli
|
||||||
title: Developer Guide
|
title: Developer Guide
|
||||||
type: dev
|
type: dev-guide
|
||||||
cloud_environments:
|
cloud_environments:
|
||||||
- name: eu_de
|
- name: eu_de
|
||||||
visibility: public
|
visibility: public
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
hc_location: devg/dms
|
hc_location: devg/dms
|
||||||
html_location: docs/dms/dev
|
html_location: docs/dms/dev
|
||||||
link: /distributed-message-service/dev-guide/
|
link: /distributed-message-service/dev-guide/
|
||||||
rst_location: dev_guide/source
|
rst_location: doc/dev-guide/source
|
||||||
service_type: dms
|
service_type: dms
|
||||||
title: Developer Guide
|
title: Developer Guide
|
||||||
type: dev
|
type: dev-guide
|
||||||
cloud_environments:
|
cloud_environments:
|
||||||
- name: eu_de
|
- name: eu_de
|
||||||
visibility: public
|
visibility: public
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
hc_location: devg/dws
|
hc_location: devg/dws
|
||||||
html_location: docs/dws/dev
|
html_location: docs/dws/dev
|
||||||
link: /data-warehouse-service/dev-guide/
|
link: /data-warehouse-service/dev-guide/
|
||||||
rst_location: dev_guide/source
|
rst_location: doc/dev-guide/source
|
||||||
service_type: dws
|
service_type: dws
|
||||||
title: Developer Guide
|
title: Developer Guide
|
||||||
type: dev
|
type: dev-guide
|
||||||
cloud_environments:
|
cloud_environments:
|
||||||
- name: eu_de
|
- name: eu_de
|
||||||
visibility: public
|
visibility: public
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
hc_location: devg/ecs
|
hc_location: devg/ecs
|
||||||
html_location: docs/ecs/dev
|
html_location: docs/ecs/dev
|
||||||
link: /elastic-cloud-server/dev-guide/
|
link: /elastic-cloud-server/dev-guide/
|
||||||
rst_location: dev_guide/source
|
rst_location: doc/dev-guide/source
|
||||||
service_type: ecs
|
service_type: ecs
|
||||||
title: Developer Guide
|
title: Developer Guide
|
||||||
type: dev
|
type: dev-guide
|
||||||
cloud_environments:
|
cloud_environments:
|
||||||
- name: eu_de
|
- name: eu_de
|
||||||
visibility: public
|
visibility: public
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
hc_location: devg/evs
|
hc_location: devg/evs
|
||||||
html_location: docs/evs/dev
|
html_location: docs/evs/dev
|
||||||
link: /elastic-volume-service/dev-guide/
|
link: /elastic-volume-service/dev-guide/
|
||||||
rst_location: dev_guide/source
|
rst_location: doc/dev-guide/source
|
||||||
service_type: evs
|
service_type: evs
|
||||||
title: Developer Guide
|
title: Developer Guide
|
||||||
type: dev
|
type: dev-guide
|
||||||
cloud_environments:
|
cloud_environments:
|
||||||
- name: eu_de
|
- name: eu_de
|
||||||
visibility: public
|
visibility: public
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
hc_location: devg/functiongraph
|
hc_location: devg/functiongraph
|
||||||
html_location: docs/fg/dev
|
html_location: docs/fg/dev
|
||||||
link: /function-graph/dev-guide/
|
link: /function-graph/dev-guide/
|
||||||
rst_location: dev_guide/source
|
rst_location: doc/dev-guide/source
|
||||||
service_type: fg
|
service_type: fg
|
||||||
title: Developer Guide
|
title: Developer Guide
|
||||||
type: dev
|
type: dev-guide
|
||||||
cloud_environments:
|
cloud_environments:
|
||||||
- name: eu_de
|
- name: eu_de
|
||||||
visibility: internal
|
visibility: internal
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
hc_location: devg/ims
|
hc_location: devg/ims
|
||||||
html_location: docs/ims/dev
|
html_location: docs/ims/dev
|
||||||
link: /image-management-service/dev-guide/
|
link: /image-management-service/dev-guide/
|
||||||
rst_location: dev_guide/source
|
rst_location: doc/dev-guide/source
|
||||||
service_type: ims
|
service_type: ims
|
||||||
title: Developer Guide
|
title: Developer Guide
|
||||||
type: dev
|
type: dev-guide
|
||||||
cloud_environments:
|
cloud_environments:
|
||||||
- name: eu_de
|
- name: eu_de
|
||||||
visibility: public
|
visibility: public
|
||||||
|
@ -6,17 +6,33 @@ jobs:
|
|||||||
tox-docs:
|
tox-docs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
{%- if environment == 'internal' %}
|
||||||
- uses: https://github.com/opentelekomcloud-infra/github-actions/.github/actions/tox-run-env@v1
|
- uses: https://github.com/opentelekomcloud-infra/github-actions/.github/actions/tox-run-env@v1
|
||||||
with:
|
with:
|
||||||
tox-env: docs
|
tox-env: docs
|
||||||
|
|
||||||
- name: Upload documentation preview
|
- name: Upload documentation preview
|
||||||
|
{% raw -%}
|
||||||
|
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
|
||||||
|
{%- endraw %}
|
||||||
uses: https://github.com/opentelekomcloud-infra/github-actions/.github/actions/tox-upload-swift@v1
|
uses: https://github.com/opentelekomcloud-infra/github-actions/.github/actions/tox-upload-swift@v1
|
||||||
|
{%- elif environment == 'public' %}
|
||||||
|
- uses: opentelekomcloud-infra/github-actions/.github/actions/tox-run-env@v1
|
||||||
|
with:
|
||||||
|
tox-env: docs
|
||||||
|
|
||||||
|
- name: Upload documentation preview
|
||||||
|
{% raw -%}
|
||||||
|
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
|
||||||
|
{%- endraw %}
|
||||||
|
uses: opentelekomcloud-infra/github-actions/.github/actions/tox-upload-swift@v1
|
||||||
|
{%- endif %}
|
||||||
with:
|
with:
|
||||||
docs_path: "doc/build/html"
|
docs_path: "doc/build/html"
|
||||||
docs_service: {{ service_uri }}
|
docs_service: {{ service_uri }}
|
||||||
swift_container: "gitea_action_logs"
|
{%- if environment == 'internal' %}
|
||||||
{% raw -%}
|
{% raw -%}
|
||||||
|
swift_container: "gitea_action_logs"
|
||||||
otc_swift_username: ${{ secrets.OTC_SWIFT_USERNAME }}
|
otc_swift_username: ${{ secrets.OTC_SWIFT_USERNAME }}
|
||||||
otc_swift_password: ${{ secrets.OTC_SWIFT_PASSWORD }}
|
otc_swift_password: ${{ secrets.OTC_SWIFT_PASSWORD }}
|
||||||
otc_swift_project_name: ${{ secrets.OTC_SWIFT_PROJECT_NAME }}
|
otc_swift_project_name: ${{ secrets.OTC_SWIFT_PROJECT_NAME }}
|
||||||
@ -27,4 +43,20 @@ jobs:
|
|||||||
repo: ${{ gitea.repository }}
|
repo: ${{ gitea.repository }}
|
||||||
pr_number: ${{ gitea.event.pull_request.number }}
|
pr_number: ${{ gitea.event.pull_request.number }}
|
||||||
run_id: ${{ gitea.run_id }}
|
run_id: ${{ gitea.run_id }}
|
||||||
{%- endraw %}
|
ci_platform: gitea
|
||||||
|
{%- endraw %}
|
||||||
|
{%- elif environment == 'public' %}
|
||||||
|
{% raw -%}
|
||||||
|
swift_container: "gh_action_logs"
|
||||||
|
otc_swift_username: ${{ secrets.OTC_SWIFT_USERNAME }}
|
||||||
|
otc_swift_password: ${{ secrets.OTC_SWIFT_PASSWORD }}
|
||||||
|
otc_swift_project_name: ${{ secrets.OTC_SWIFT_PROJECT_NAME }}
|
||||||
|
otc_swift_domain: ${{ secrets.OTC_SWIFT_DOMAIN }}
|
||||||
|
otc_swift_endpoint: ${{ secrets.OTC_SWIFT_ENDPOINT }}
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
repo: ${{ github.repository }}
|
||||||
|
pr_number: ${{ github.event.pull_request.number }}
|
||||||
|
run_id: ${{ github.run_id }}
|
||||||
|
ci_platform: github
|
||||||
|
{%- endraw %}
|
||||||
|
{%- endif %}
|
@ -6,17 +6,33 @@ jobs:
|
|||||||
tox-pdf-docs:
|
tox-pdf-docs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
{%- if environment == 'internal' %}
|
||||||
- uses: https://github.com/opentelekomcloud-infra/github-actions/.github/actions/tox-run-env@v1
|
- uses: https://github.com/opentelekomcloud-infra/github-actions/.github/actions/tox-run-env@v1
|
||||||
with:
|
with:
|
||||||
tox-env: pdf-docs
|
tox-env: pdf-docs
|
||||||
|
|
||||||
- name: Upload documentation preview
|
- name: Upload documentation preview
|
||||||
|
{% raw -%}
|
||||||
|
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
|
||||||
|
{%- endraw %}
|
||||||
uses: https://github.com/opentelekomcloud-infra/github-actions/.github/actions/tox-upload-swift@v1
|
uses: https://github.com/opentelekomcloud-infra/github-actions/.github/actions/tox-upload-swift@v1
|
||||||
|
{%- elif environment == 'public' %}
|
||||||
|
- uses: opentelekomcloud-infra/github-actions/.github/actions/tox-run-env@v1
|
||||||
|
with:
|
||||||
|
tox-env: pdf-docs
|
||||||
|
|
||||||
|
- name: Upload documentation preview
|
||||||
|
{% raw -%}
|
||||||
|
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
|
||||||
|
{%- endraw %}
|
||||||
|
uses: opentelekomcloud-infra/github-actions/.github/actions/tox-upload-swift@v1
|
||||||
|
{%- endif %}
|
||||||
with:
|
with:
|
||||||
docs_path: "doc/build/pdf"
|
docs_path: "doc/build/pdf"
|
||||||
docs_service: {{ service_uri }}
|
docs_service: {{ service_uri }}
|
||||||
swift_container: "gitea_action_logs"
|
{%- if environment == 'internal' %}
|
||||||
{% raw -%}
|
{% raw -%}
|
||||||
|
swift_container: "gitea_action_logs"
|
||||||
otc_swift_username: ${{ secrets.OTC_SWIFT_USERNAME }}
|
otc_swift_username: ${{ secrets.OTC_SWIFT_USERNAME }}
|
||||||
otc_swift_password: ${{ secrets.OTC_SWIFT_PASSWORD }}
|
otc_swift_password: ${{ secrets.OTC_SWIFT_PASSWORD }}
|
||||||
otc_swift_project_name: ${{ secrets.OTC_SWIFT_PROJECT_NAME }}
|
otc_swift_project_name: ${{ secrets.OTC_SWIFT_PROJECT_NAME }}
|
||||||
@ -27,4 +43,20 @@ jobs:
|
|||||||
repo: ${{ gitea.repository }}
|
repo: ${{ gitea.repository }}
|
||||||
pr_number: ${{ gitea.event.pull_request.number }}
|
pr_number: ${{ gitea.event.pull_request.number }}
|
||||||
run_id: ${{ gitea.run_id }}
|
run_id: ${{ gitea.run_id }}
|
||||||
{%- endraw %}
|
ci_platform: gitea
|
||||||
|
{%- endraw %}
|
||||||
|
{%- elif environment == 'public' %}
|
||||||
|
{% raw -%}
|
||||||
|
swift_container: "gh_action_logs"
|
||||||
|
otc_swift_username: ${{ secrets.OTC_SWIFT_USERNAME }}
|
||||||
|
otc_swift_password: ${{ secrets.OTC_SWIFT_PASSWORD }}
|
||||||
|
otc_swift_project_name: ${{ secrets.OTC_SWIFT_PROJECT_NAME }}
|
||||||
|
otc_swift_domain: ${{ secrets.OTC_SWIFT_DOMAIN }}
|
||||||
|
otc_swift_endpoint: ${{ secrets.OTC_SWIFT_ENDPOINT }}
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
repo: ${{ github.repository }}
|
||||||
|
pr_number: ${{ github.event.pull_request.number }}
|
||||||
|
run_id: ${{ github.run_id }}
|
||||||
|
ci_platform: github
|
||||||
|
{%- endraw %}
|
||||||
|
{%- endif %}
|
@ -152,7 +152,7 @@ commands =
|
|||||||
rm -rf {toxinidir}/packages.txt
|
rm -rf {toxinidir}/packages.txt
|
||||||
wget -O {toxinidir}/bindep.txt https://raw.githubusercontent.com/opentelekomcloud/otcdocstheme/main/bindep.txt
|
wget -O {toxinidir}/bindep.txt https://raw.githubusercontent.com/opentelekomcloud/otcdocstheme/main/bindep.txt
|
||||||
bash -c "bindep test -b -f {toxinidir}/bindep.txt > {toxinidir}/packages.txt || true"
|
bash -c "bindep test -b -f {toxinidir}/bindep.txt > {toxinidir}/packages.txt || true"
|
||||||
bash -c 'if [ -s {toxinidir}/packages.txt ]; then if command -v apt &>/dev/null; then apt update && xargs apt install --no-install-recommends -y < {toxinidir}/packages.txt; fi; fi'
|
bash -c 'if [ -s {toxinidir}/packages.txt ]; then if command -v apt &>/dev/null; then sudo apt update && xargs sudo apt install --no-install-recommends -y < {toxinidir}/packages.txt; fi; fi'
|
||||||
bash -c 'if [ -s {toxinidir}/packages.txt ]; then if command -v dnf &>/dev/null; then dnf install -y $(cat {toxinidir}/packages.txt); fi; fi'
|
bash -c 'if [ -s {toxinidir}/packages.txt ]; then if command -v dnf &>/dev/null; then dnf install -y $(cat {toxinidir}/packages.txt); fi; fi'
|
||||||
|
|
||||||
[doc8]
|
[doc8]
|
||||||
|
@ -356,8 +356,10 @@ def process_repositories(args, service):
|
|||||||
context["docs"].append(doc)
|
context["docs"].append(doc)
|
||||||
if args.cloud_environment == "swiss":
|
if args.cloud_environment == "swiss":
|
||||||
context["template"] = "helpcenter-swiss-base-jobs"
|
context["template"] = "helpcenter-swiss-base-jobs"
|
||||||
elif args.cloud_environment == "eu_de":
|
elif args.cloud_environment == "eu_de" and args.target_environment == "internal":
|
||||||
context["template"] = "helpcenter-base-jobs"
|
context["template"] = "helpcenter-base-jobs"
|
||||||
|
elif args.cloud_environment == "eu_de" and args.target_environment == "public":
|
||||||
|
context["template"] = "helpcenter-base-jobs-no-check"
|
||||||
context["service_type"] = service['service_type']
|
context["service_type"] = service['service_type']
|
||||||
|
|
||||||
zuul_yaml_content = zuul_yaml_template.render(**context)
|
zuul_yaml_content = zuul_yaml_template.render(**context)
|
||||||
@ -371,21 +373,33 @@ def process_repositories(args, service):
|
|||||||
"""Update actions"""
|
"""Update actions"""
|
||||||
context = dict(docs=[])
|
context = dict(docs=[])
|
||||||
context["service_uri"] = service['service_uri']
|
context["service_uri"] = service['service_uri']
|
||||||
|
context["environment"] = args.target_environment
|
||||||
|
|
||||||
actions_yaml_content_html = actions_yaml_template_html.render(**context)
|
actions_yaml_content_html = actions_yaml_template_html.render(**context)
|
||||||
actions_yaml_content_pdf = actions_yaml_template_pdf.render(**context)
|
actions_yaml_content_pdf = actions_yaml_template_pdf.render(**context)
|
||||||
actions_yaml_content_html_path = pathlib.Path(copy_to, ".gitea", "workflows", "build-html-docs.yaml")
|
if args.target_environment == "internal":
|
||||||
actions_yaml_content_html_path.parent.mkdir(parents=True, exist_ok=True)
|
actions_yaml_content_html_path = pathlib.Path(copy_to, ".gitea", "workflows", "build-html-docs.yaml")
|
||||||
actions_yaml_content_pdf_path = pathlib.Path(copy_to, ".gitea", "workflows", "build-pdf-docs.yaml")
|
actions_yaml_content_html_path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
actions_yaml_content_pdf_path.parent.mkdir(parents=True, exist_ok=True)
|
actions_yaml_content_pdf_path = pathlib.Path(copy_to, ".gitea", "workflows", "build-pdf-docs.yaml")
|
||||||
|
actions_yaml_content_pdf_path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
elif args.target_environment == "public":
|
||||||
|
actions_yaml_content_html_path = pathlib.Path(copy_to, ".github", "workflows", "build-html-docs.yaml")
|
||||||
|
actions_yaml_content_html_path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
actions_yaml_content_pdf_path = pathlib.Path(copy_to, ".github", "workflows", "build-pdf-docs.yaml")
|
||||||
|
actions_yaml_content_pdf_path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
with open(actions_yaml_content_html_path, "w", encoding="utf-8", newline="") as out:
|
with open(actions_yaml_content_html_path, "w", encoding="utf-8", newline="") as out:
|
||||||
logging.debug(f"Generating {actions_yaml_content_html_path} from template...")
|
logging.debug(f"Generating {actions_yaml_content_html_path} from template...")
|
||||||
out.write(actions_yaml_content_html)
|
out.write(actions_yaml_content_html)
|
||||||
repo_to.index.add([".gitea/workflows/build-html-docs.yaml"])
|
|
||||||
with open(actions_yaml_content_pdf_path, "w", encoding="utf-8", newline="") as out:
|
with open(actions_yaml_content_pdf_path, "w", encoding="utf-8", newline="") as out:
|
||||||
logging.debug(f"Generating {actions_yaml_content_pdf_path} from template...")
|
logging.debug(f"Generating {actions_yaml_content_pdf_path} from template...")
|
||||||
out.write(actions_yaml_content_pdf)
|
out.write(actions_yaml_content_pdf)
|
||||||
repo_to.index.add([".gitea/workflows/build-pdf-docs.yaml"])
|
if args.target_environment == "internal":
|
||||||
|
repo_to.index.add([".gitea/workflows/build-html-docs.yaml"])
|
||||||
|
repo_to.index.add([".gitea/workflows/build-pdf-docs.yaml"])
|
||||||
|
elif args.target_environment == "public":
|
||||||
|
repo_to.index.add([".github/workflows/build-html-docs.yaml"])
|
||||||
|
repo_to.index.add([".github/workflows/build-pdf-docs.yaml"])
|
||||||
|
|
||||||
if len(repo_to.index.diff("HEAD")) == 0:
|
if len(repo_to.index.diff("HEAD")) == 0:
|
||||||
# Nothing to commit
|
# Nothing to commit
|
||||||
|
Reference in New Issue
Block a user