From 0a3b8c925bbed6aa866e458e9b1683be7f5a06fa Mon Sep 17 00:00:00 2001 From: Jonathan Gangi Date: Thu, 29 Aug 2024 10:22:40 -0300 Subject: [PATCH] Community: Allow using beta from push item This commit changes the community workflow to enrich a push item with "beta" if either the CLI argument `--beta` is passed or the incoming push item release type is marked as `beta`. Refers to SPSTRAT-367 --- src/pubtools/_marketplacesvm/tasks/community_push/command.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pubtools/_marketplacesvm/tasks/community_push/command.py b/src/pubtools/_marketplacesvm/tasks/community_push/command.py index 2bcd469..4671e56 100644 --- a/src/pubtools/_marketplacesvm/tasks/community_push/command.py +++ b/src/pubtools/_marketplacesvm/tasks/community_push/command.py @@ -300,11 +300,10 @@ def enrich_mapped_items(self, mapped_items: List[MappedVMIPushItem]) -> List[Enr pi = mapped_item.get_push_item_for_marketplace(storage_account) log.debug("Mapped push item for %s: %s", storage_account, pi) + beta = self.args.beta or str(pi.release.type) == "beta" for dest in destinations: - epi = enrich_push_item( - pi, dest, beta=self.args.beta, require_bc=self._REQUIRE_BC - ) + epi = enrich_push_item(pi, dest, beta=beta, require_bc=self._REQUIRE_BC) log.debug("Enriched push item for %s: %s", storage_account, epi) # SAP and RHEL-HA images are expected to be