#9378 Using odcs to run private composes
Merged 4 years ago by mohanboddu. Opened 4 years ago by mohanboddu.
mohanboddu/releng odcs-private-compose  into  master

@@ -0,0 +1,29 @@ 

+ #!/usr/bin/python

+ # -*- coding: utf-8 -*-

+ #

+ # SPDX-License-Identifier:      GPL-2.0

+ # Author: Mohan Boddu <mboddu@bhujji.com>

+ #

+ # Private compose from a tag using odcs

+ #

+ 

+ import argparse

+ from odcs.client.odcs import ODCS, AuthMech, ComposeSourceTag

+ 

+ # We need oidc token to authenticate to odcs and a koji tag to compose from

+ parser = argparse.ArgumentParser()

+ parser.add_argument("token", help="OIDC token for authenticating to ODCS")

+ parser.add_argument("tag", help="koji tag to compose")

+ args = parser.parse_args()

+ token = args.token

+ tag = args.tag

+ 

+ odcs = ODCS("https://odcs.fedoraproject.org",

+             auth_mech=AuthMech.OpenIDC,

+             openidc_token=token)

+ 

+ source = ComposeSourceTag(tag)

+ 

+ # Making a private compose with no inheritance

+ compose = odcs.request_compose(source, target_dir="private", flags=["no_inheritance"])

+ print(compose)

This will be used in generating openh264 repos

Signed-off-by: Mohan Boddu mboddu@bhujji.com

Oh should we add a SOP for that or if there is one modify it to use that script ?

Oh should we add a SOP for that or if there is one modify it to use that script ?

Well, I have to write one, but I need to use it first and since the dir structure this script generates is different from that of mash.

Once I figure it out, I will add the docs.

Pull-Request has been merged by mohanboddu

4 years ago
Metadata