Update 'zuul.yaml'
Reviewed-by: Goncharov, Artem <artem.goncharov@t-systems.com> Co-authored-by: gtema <artem.goncharov@gmail.com> Co-committed-by: gtema <artem.goncharov@gmail.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,3 @@
|
||||
import copy
|
||||
import re
|
||||
|
||||
import otc_metadata.services
|
||||
@ -7,21 +6,17 @@ from ruamel.yaml import YAML
|
||||
data = otc_metadata.services.Services()
|
||||
new_data = data._service_data
|
||||
|
||||
#services = data.service_dict
|
||||
# services = data.service_dict
|
||||
|
||||
for doc in new_data["documents"]:
|
||||
hc_location = None
|
||||
link = doc.get("link")
|
||||
if link:
|
||||
print(f"Parsing {link}")
|
||||
#(p1, p2) = link.split("/")
|
||||
doc["link"] = re.sub(
|
||||
r"/(.*)/(.*)/",
|
||||
r"/\2/\1/",
|
||||
link
|
||||
)
|
||||
# (p1, p2) = link.split("/")
|
||||
doc["link"] = re.sub(r"/(.*)/(.*)/", r"/\2/\1/", link)
|
||||
|
||||
_yaml = YAML()
|
||||
_yaml.indent(mapping=2, sequence=4, offset=2)
|
||||
with open('new.yaml', 'w') as fd:
|
||||
with open("new.yaml", "w") as fd:
|
||||
_yaml.dump(new_data, fd)
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -13,7 +13,9 @@ def main():
|
||||
|
||||
_yaml = YAML()
|
||||
_yaml.indent(mapping=2, sequence=4, offset=2)
|
||||
sys.stdout.write("# Auto-generated by otc_metadata.generate_docexports.data\n")
|
||||
sys.stdout.write(
|
||||
"# Auto-generated by otc_metadata.generate_docexports.data\n"
|
||||
)
|
||||
_yaml.dump(data.docs_html_by_category("internal"), sys.stdout)
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
import copy
|
||||
# import copy
|
||||
|
||||
import otc_metadata.services
|
||||
from ruamel.yaml import YAML
|
||||
# from ruamel.yaml import YAML
|
||||
|
||||
data = otc_metadata.services.Services()
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -15,15 +15,15 @@
|
||||
|
||||
import argparse
|
||||
import logging
|
||||
import os
|
||||
# import os
|
||||
import pathlib
|
||||
import requests
|
||||
import subprocess
|
||||
import warnings
|
||||
# import warnings
|
||||
|
||||
from git import exc
|
||||
from git import Repo
|
||||
from git import SymbolicReference
|
||||
# from git import SymbolicReference
|
||||
|
||||
from ruamel.yaml import CommentedMap
|
||||
from ruamel.yaml import YAML
|
||||
@ -72,7 +72,7 @@ def process_repositories(args, service):
|
||||
workdir.mkdir(exist_ok=True)
|
||||
|
||||
copy_to = None
|
||||
repo_to = None
|
||||
# repo_to = None
|
||||
|
||||
for repo in service["repositories"]:
|
||||
logging.debug(f"Processing repository {repo}")
|
||||
@ -208,8 +208,7 @@ def process_repositories(args, service):
|
||||
project["check"]["jobs"].extend(
|
||||
[x["job"]["name"] for x in zuul_new_jobs])
|
||||
|
||||
|
||||
#yaml.indent(offset=2, sequence=2)
|
||||
# yaml.indent(offset=2, sequence=2)
|
||||
with open(zuul_file_name, "w") as f:
|
||||
yaml.dump(zuul_config, f)
|
||||
git_repo.index.add([zuul_file_name.name])
|
||||
@ -223,7 +222,8 @@ def process_repositories(args, service):
|
||||
git_repo.index.commit(
|
||||
(
|
||||
"Update zuul.yaml file\n\n"
|
||||
"Performed-by: gitea/infra/otc-metadata/tools/update_zuul_project_config.py"
|
||||
"Performed-by: gitea/infra/otc-metadata"
|
||||
"/tools/update_zuul_project_config.py"
|
||||
)
|
||||
)
|
||||
push_args = ["--set-upstream", "origin", branch_name]
|
||||
|
Reference in New Issue
Block a user