ci/run_n_monitor: Add --dry-run argument
This will just print out the target jobs and their dependencies, then exit. Signed-off-by: Daniel Stone <daniels@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30784>
This commit is contained in:
@@ -408,6 +408,11 @@ def parse_args() -> argparse.Namespace:
|
|||||||
default="mesa",
|
default="mesa",
|
||||||
help="GitLab project in the format <user>/<project> or just <project>",
|
help="GitLab project in the format <user>/<project> or just <project>",
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--dry-run",
|
||||||
|
action="store_true",
|
||||||
|
help="Exit after printing target jobs and dependencies",
|
||||||
|
)
|
||||||
|
|
||||||
mutex_group1 = parser.add_mutually_exclusive_group()
|
mutex_group1 = parser.add_mutually_exclusive_group()
|
||||||
mutex_group1.add_argument(
|
mutex_group1.add_argument(
|
||||||
@@ -628,6 +633,10 @@ def main() -> None:
|
|||||||
iid=pipe.iid,
|
iid=pipe.iid,
|
||||||
project_path=cur_project
|
project_path=cur_project
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if args.dry_run:
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
target_job_id, ret, exec_t = monitor_pipeline(
|
target_job_id, ret, exec_t = monitor_pipeline(
|
||||||
cur_project,
|
cur_project,
|
||||||
pipe,
|
pipe,
|
||||||
|
Reference in New Issue
Block a user