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

import-debian-package: don't trigger pipeline on downstream, instead create a merge request


Actually pipelines on downstreams fail at this step because these branches
are missing the debian/apertis/copyright file. Instead we create a merge request,
thus the missing file will be generated with the job scan-licenses.

Signed-off-by: default avatarDylan Aïssi <dylan.aissi@collabora.com>
parent e034e8a2
No related branches found
No related tags found
1 merge request!88import-debian-package: don't trigger pipeline on downstream, instead create a merge request
......@@ -220,7 +220,9 @@ def import_debian_dsc(args, dsc_file: Path, upstream: str, downstream: str, vers
git.tag('-d', epochless_tag)
commit = parse_ref(debian_tag)
force_branch(downstream, commit)
git.checkout(f'{downstream}')
proposed_branch = f'proposed-package/{downstream}'
force_branch(proposed_branch, commit)
git.checkout(f'{proposed_branch}')
logging.info('Adding Apertis delta')
f_compo = Path('debian/apertis/component')
f_compo.parent.mkdir(exist_ok=True)
......@@ -401,9 +403,10 @@ def do_import(args):
logging.info('Applying Gitlab rules')
apply_gitlab_rulez(args.gitlab_instance, args.gitlab_server_url, args.gitlab_api_token, args.package)
logging.info('Triggering CI pipelines on downstream branches')
for branch in [downstream] + args.downstreams:
project.pipelines.create({'ref': branch})
logging.info('Creating merge request')
mr = project.mergerequests.create({'source_branch': f'proposed-package/{downstream}',
'target_branch': downstream,
'title': f'Initial import of {package}'})
def parse_abspath(path):
return argparse.FileType('r')(os.path.abspath(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