Switch project-config to promote jobs [3]: Update building

For using opendev-tox-docs, jobs need to publish to a "html"
subdirectory, update the docs-site and specs jobs.

Update .gitignore for this.

Update python files to use yaml.safe_load to avoid a warning.

Remove unused docs environment from tox.ini.

Depends-On: https://review.opendev.org/682213
Change-Id: I8d7032a6e836ec26f347d16abd600514089a677b
This commit is contained in:
Andreas Jaeger 2019-09-14 16:55:43 +02:00
parent 6cb2ca301f
commit 800ea0aa05
4 changed files with 6 additions and 8 deletions

3
.gitignore vendored
View File

@ -7,4 +7,5 @@
/.project /.project
/.pydevproject /.pydevproject
*.egg *.egg
specs/output specs/html
docs-site/html

View File

@ -44,7 +44,7 @@ parser.add_argument(
args = parser.parse_args() args = parser.parse_args()
print('Reading documents data from %r' % args.infile) print('Reading documents data from %r' % args.infile)
infile = yaml.load(open(args.infile, 'r')) infile = yaml.safe_load(open(args.infile, 'r'))
template_path = os.path.dirname(args.infile) template_path = os.path.dirname(args.infile)
template_context = { template_context = {
@ -52,7 +52,7 @@ template_context = {
'all': infile['documents'] 'all': infile['documents']
} }
outdir = os.path.join(template_path, 'output') outdir = os.path.join(template_path, 'html')
if not os.path.exists(outdir): if not os.path.exists(outdir):
os.makedirs(outdir) os.makedirs(outdir)

View File

@ -44,7 +44,7 @@ parser.add_argument(
args = parser.parse_args() args = parser.parse_args()
print('Reading project data from %r' % args.infile) print('Reading project data from %r' % args.infile)
infile = yaml.load(open(args.infile, 'r')) infile = yaml.safe_load(open(args.infile, 'r'))
template_path = os.path.dirname(args.infile) template_path = os.path.dirname(args.infile)
template_context = { template_context = {
@ -53,7 +53,7 @@ template_context = {
'all': infile['projects'] + infile['programs'], 'all': infile['projects'] + infile['programs'],
} }
outdir = os.path.join(template_path, 'output') outdir = os.path.join(template_path, 'html')
if not os.path.exists(outdir): if not os.path.exists(outdir):
os.makedirs(outdir) os.makedirs(outdir)

View File

@ -68,9 +68,6 @@ commands =
[testenv:venv] [testenv:venv]
commands = {posargs} commands = {posargs}
[testenv:docs]
commands = python setup.py build_sphinx
[testenv:irc] [testenv:irc]
deps = deps =
PyYAML PyYAML