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:
2023-01-02 18:56:58 +00:00
committed by zuul
parent e0dc83ddc4
commit ba65aca9eb
20 changed files with 240 additions and 310 deletions

View File

@ -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]