Skip to content
Snippets Groups Projects
Commit 6373d9f8 authored by Emanuele Aina's avatar Emanuele Aina
Browse files

tests: Set the rebuild=local/block=never meta in a simpler way


Thanks to @refi64 for making me discover that `osc branch` already had
this functionality built-in. D'oh.

Signed-off-by: Emanuele Aina's avatarEmanuele Aina <emanuele.aina@collabora.com>
parent ea8f1e3b
No related branches found
No related tags found
1 merge request!219tests: Set the rebuild=local/block=never meta in a simpler way
Pipeline #337127 passed
......@@ -8,7 +8,6 @@ import re
import subprocess
import time
import urllib.parse
import xml.etree.ElementTree as ET
import git
import gitlab
......@@ -292,19 +291,9 @@ class GitLabToOBSTester:
target_project=project,
msg=msg,
force=True,
add_repositories_block="never",
add_repositories_rebuild="local",
)
meta_lines = osc.core.show_project_meta(self.apiurl, project)
meta_xml = ET.fromstringlist(meta_lines)
for repository in meta_xml.iter("repository"):
repository.set("rebuild", "local")
repository.set("block", "never")
meta_url = osc.core.make_meta_url(
"prj", path_args=project, apiurl=self.apiurl
)
meta = osc.core.metafile(
meta_url, ET.tostring(meta_xml, encoding="unicode")
)
meta.sync()
def point_gitlab_ci_here(self, ci_config_path):
logging.info(f"pointing to the CI definition at {ci_config_path}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment