From e1df8e4f63fd7de80d48061abdd535d76708c1be Mon Sep 17 00:00:00 2001 From: Dominik Rumian Date: Mar 04 2022 10:35:56 +0000 Subject: Warning message when 'rhpkg request-side-tag' is used Option 'request-side-tag' cannot be used to create production builds. This commit adds a wng message informing about this fact and suggestithe option suitable for production. Jira: RHELCMP-8358 Signed-off-by: Dominik Rumian --- diff --git a/pyrpkg/cli.py b/pyrpkg/cli.py index 8efb841..2d87fd9 100644 --- a/pyrpkg/cli.py +++ b/pyrpkg/cli.py @@ -2738,10 +2738,17 @@ class cliClient(object): self.cmd.remove_side_tag(self.args.TAG) print("Tag deleted.") - def request_side_tag(self): + def request_side_tag(self, production_options=False): + """ + Handle request-side-tag command + :param production_options: used to specify if production options are used + """ tag_info = self.cmd.request_side_tag( base_tag=self.args.base_tag, suffix=self.args.suffix ) + if not production_options: + print("WARNING: You are creating side-tag which cannot be gated and its content " + "cannot be released. Consider using the `request-gated-side-tag") print("Side tag '%(name)s' (id %(id)d) created." % tag_info) print("Use '%s build --target=%s' to use it." % (self.name, tag_info["name"])) print(