ci_run_n_monitor: allow passing multiple targets
When generating the list of targets from a script, being able to just pass `--target "${list[@]}"` is very convenient. The list of targets is simply converted to an "or" regex, matching any of the `--target`s given. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27252>
This commit is contained in:

committed by
Marge Bot

parent
eeba409c54
commit
6825c67c99
@@ -269,6 +269,7 @@ def parse_args() -> None:
|
||||
metavar="target-job",
|
||||
help="Target job regex. For multiple targets, separate with pipe | character",
|
||||
required=True,
|
||||
nargs=argparse.ONE_OR_MORE,
|
||||
)
|
||||
parser.add_argument(
|
||||
"--token",
|
||||
@@ -381,10 +382,11 @@ if __name__ == "__main__":
|
||||
print(f"Revision: {REV}")
|
||||
print(f"Pipeline: {pipe.web_url}")
|
||||
|
||||
target_jobs_regex = re.compile(args.target.strip())
|
||||
target = '|'.join(args.target)
|
||||
target_jobs_regex = re.compile(target.strip())
|
||||
|
||||
deps = set()
|
||||
print("🞋 job: " + Fore.BLUE + args.target + Style.RESET_ALL)
|
||||
print("🞋 job: " + Fore.BLUE + target + Style.RESET_ALL)
|
||||
deps = find_dependencies(
|
||||
target_jobs_regex=target_jobs_regex, iid=pipe.iid, project_path=cur_project
|
||||
)
|
||||
|
Reference in New Issue
Block a user