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

generate-test-pipeline.py: add an option adding 'rules: when' to the test pipeline


This option is required to trigger the test pipeline as a child pipeline
in our ci-package-builder pipeline. Without 'rules: when' set
the child test pipeline is not triggered.

Signed-off-by: default avatarDylan Aïssi <dylan.aissi@collabora.com>
parent 940b47c9
No related branches found
No related tags found
1 merge request!581Add a package centric job template
Pipeline #664794 passed
......@@ -52,6 +52,9 @@ parser.add_argument('-b', '--test-job-base', action='append', default=[],
help="""a gitlab job (usually a hidden job) that
the generated test jobs can extend);
this can be specified multiple times""")
parser.add_argument('--rules-when', type=str,
help="""add a 'rules: when' to the test pipeline,
it can be 'on_success' or 'always'""")
parser.add_argument('test_files', metavar="TESTS", nargs='+',
help="Lava test files to be run in the pipeline")
......@@ -85,5 +88,7 @@ for f in args.test_files:
"needs": [ dict(test_source) ],
"script": [ f"submit {os.path.basename(f)}" ],
}
if args.rules_when:
pipeline[job]["rules"] = [ { "when": args.rules_when } ]
args.output.write(yaml.dump(pipeline))
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