Compare commits
4 Commits
minify-tem
...
tox-bindep
Author | SHA1 | Date | |
---|---|---|---|
7b80f2c53d | |||
bff9eff2bd | |||
d5e7269ae9 | |||
1541a02210 |
3
.gitignore
vendored
3
.gitignore
vendored
@ -59,3 +59,6 @@ ChangeLog
|
|||||||
|
|
||||||
# Files created by releasenotes build
|
# Files created by releasenotes build
|
||||||
releasenotes/build
|
releasenotes/build
|
||||||
|
|
||||||
|
bindep.txt
|
||||||
|
packages.txt
|
@ -1,3 +1,3 @@
|
|||||||
---
|
---
|
||||||
name: database
|
name: database
|
||||||
title: Database
|
title: Databases
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
sphinx>=2.0.0,!=2.1.0 # BSD
|
sphinx>=2.0.0,!=2.1.0 # BSD
|
||||||
|
{% if target_environment == 'public' %}
|
||||||
|
otcdocstheme<1.0.0 # Apache-2.0
|
||||||
|
{% elif target_environment == 'internal' %}
|
||||||
otcdocstheme # Apache-2.0
|
otcdocstheme # Apache-2.0
|
||||||
|
{% else %}
|
||||||
|
otcdocstheme # Apache-2.0
|
||||||
|
{% endif %}
|
||||||
# releasenotes
|
# releasenotes
|
||||||
reno>=3.1.0 # Apache-2.0
|
reno>=3.1.0 # Apache-2.0
|
||||||
|
|
||||||
|
@ -43,15 +43,19 @@ commands =
|
|||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|
||||||
[testenv:docs-pdf]
|
[testenv:docs-pdf]
|
||||||
deps = {[testenv:docs]deps}
|
deps =
|
||||||
|
{[testenv:docs]deps}
|
||||||
|
{[testenv:bindeps]deps}
|
||||||
allowlist_externals =
|
allowlist_externals =
|
||||||
rm
|
rm
|
||||||
mkdir
|
mkdir
|
||||||
|
wget
|
||||||
make
|
make
|
||||||
bash
|
bash
|
||||||
cp
|
cp
|
||||||
commands =
|
commands =
|
||||||
mkdir -p doc/build/pdf
|
mkdir -p doc/build/pdf
|
||||||
|
{[testenv:bindeps]commands}
|
||||||
{%- for doc in docs %}
|
{%- for doc in docs %}
|
||||||
{%- if doc.pdf_name %}
|
{%- if doc.pdf_name %}
|
||||||
{[testenv:{{ doc.type }}-pdf-docs]commands}
|
{[testenv:{{ doc.type }}-pdf-docs]commands}
|
||||||
@ -118,6 +122,21 @@ commands =
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
[testenv:bindeps]
|
||||||
|
deps =
|
||||||
|
bindep
|
||||||
|
allowlist_externals =
|
||||||
|
wget
|
||||||
|
rm
|
||||||
|
bash
|
||||||
|
commands =
|
||||||
|
rm -rf {toxinidir}/bindep.txt
|
||||||
|
rm -rf {toxinidir}/packages.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 '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 dnf &>/dev/null; then dnf install -y $(cat {toxinidir}/packages.txt); fi; fi'
|
||||||
|
|
||||||
[doc8]
|
[doc8]
|
||||||
ignore = D001
|
ignore = D001
|
||||||
extensions = .rst, .yaml
|
extensions = .rst, .yaml
|
@ -247,6 +247,8 @@ def process_repositories(args, service):
|
|||||||
doc["type"] = "dev-guide"
|
doc["type"] = "dev-guide"
|
||||||
context["docs"].append(doc)
|
context["docs"].append(doc)
|
||||||
|
|
||||||
|
context["target_environment"] = args.target_environment
|
||||||
|
|
||||||
tox_ini_content = tox_ini_template.render(**context)
|
tox_ini_content = tox_ini_template.render(**context)
|
||||||
tox_ini_path = pathlib.Path(copy_to, "tox.ini")
|
tox_ini_path = pathlib.Path(copy_to, "tox.ini")
|
||||||
doc_requirements_content = doc_requirements_template.render(**context)
|
doc_requirements_content = doc_requirements_template.render(**context)
|
||||||
@ -323,6 +325,7 @@ def main():
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--target-environment",
|
"--target-environment",
|
||||||
required=True,
|
required=True,
|
||||||
|
choices=["internal", "public"],
|
||||||
help="Environment to be used as a source",
|
help="Environment to be used as a source",
|
||||||
)
|
)
|
||||||
parser.add_argument("--service-type", help="Service to update")
|
parser.add_argument("--service-type", help="Service to update")
|
||||||
|
Reference in New Issue
Block a user