From 0458e28fe2b3db1e17447829b78e71bd496eacd7 Mon Sep 17 00:00:00 2001 From: Vincent Shen Date: Thu, 30 Nov 2023 22:24:59 -0800 Subject: [PATCH] OCP4: Add option to deploy profile without upstrem prefix This pr add the ability to deploy profile without upstream prefix. ex. when you run the script to deploy ocp4 profile bundle, all the profile will have upstream in the name prefix, upstream-ocp4-cis, with -np option, we do not add upstream prefix to it --- utils/build_ds_container.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/utils/build_ds_container.py b/utils/build_ds_container.py index 72710b4dba8..d0d8b8e4524 100755 --- a/utils/build_ds_container.py +++ b/utils/build_ds_container.py @@ -42,6 +42,16 @@ '--product and --debug flags.'), action='store_true', default=False) +# with upstream prefix option as default +parser.add_argument( + '-np', '--no-upstream-prefix', + help=( + 'The prefix for bundle names. The default is "upstream" if not specified. ' + 'To disable prefix, use --no-upstream-prefix.', + 'This option is ignored when building content in the cluster using ' + '--build-in-cluster.'), + action='store_true', + default=False) parser.add_argument( '-d', '--debug', help=( @@ -216,7 +226,10 @@ def create_profile_bundles(products, content_image=None): """ for product in products: content_file = 'ssg-' + product + '-ds.xml' - product_name = 'upstream-' + product + if args.no_upstream_prefix: + product_name = product + else: + product_name = 'upstream-' + product profile_bundle_update = { 'apiVersion': 'compliance.openshift.io/v1alpha1', 'kind': 'ProfileBundle',