Skip to content
Snippets Groups Projects
Commit 7fee2244 authored by Dylan Aïssi's avatar Dylan Aïssi
Browse files

generate-test-pipeline.py: Allow to pass a GitLab project where are located the includes files


This feature will be used for package centric jobs, since we want to use
includes defined in tests/apertis-test-cases whereas the jobs run in
another repositories (i.e. pkg/***).

Signed-off-by: default avatarDylan Aïssi <dylan.aissi@collabora.com>
parent 376b6ffa
No related branches found
No related tags found
1 merge request!581Add a package centric job template
......@@ -34,6 +34,8 @@ parser = argparse.ArgumentParser(
parser.add_argument('-i', '--include', action='append', dest="includes", metavar="INCLUDE",
default=[],
help="a file to be listed in the includes section of the generated pipeline")
parser.add_argument('--project-include', type=str, dest="project_include", metavar="PROJECT INCLUDE",
help="a GitLab project where are located the includes files of the generated pipeline")
parser.add_argument('-o', '--output', type=argparse.FileType("w"), required=True, metavar="OUTPUT",
help="the pipeline filename to produce.")
parser.add_argument('-p', '--parent-pipeline', type=str, metavar="PARENT",
......@@ -55,7 +57,14 @@ parser.add_argument('test_files', metavar="TESTS", nargs='+',
args = parser.parse_args()
pipeline = { 'include': args.includes }
if args.project_include is None:
pipeline = { 'include': args.includes }
else:
pipeline = { 'include':
[{ 'project': args.project_include,
'file': args.includes,
}]
}
if args.current_job_name is None:
print("error: CI_JOB_NAME is not set, and no --current-job-name given")
......
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