Only do rhel-target if we are centpkg, not centpkg-sig

Signed-off-by: Troy Dawson <tdawson@redhat.com>
This commit is contained in:
Troy Dawson 2023-03-01 08:15:06 -08:00
parent b244b2331e
commit 00baeb2072

View file

@ -28,6 +28,7 @@ import six.moves.configparser as ConfigParser
import json
import koji
import os
import sys
_DEFAULT_API_BASE_URL = 'https://gitlab.com'
@ -157,6 +158,9 @@ class centpkgClient(cliClient):
# Overloaded _build
def _build(self, sets=None):
# Only do rhel-target if we are centpkg, not centpkg-sig
if not os.path.basename(sys.argv[0]).endswith('-sig'):
# Only run if we have internal configuraions, or scratch
internal_config_file = "/etc/rpkg/centpkg_internal.conf"
if os.path.exists(internal_config_file):
@ -228,13 +232,9 @@ class centpkgClient(cliClient):
self.log.info("Exiting")
raise SystemExit
# Good to know, but take out for final cut
# Good to know
self.log.info(" rhel-target: " + json.loads(self.args.custom_user_metadata)['rhel-target'])
# Purposely fail during testing so we do not have so many builds
# self.args.custom_user_metadata = json.loads(self.args.custom_user_metadata)
else:
if not self.args.scratch:
self.log.info("NO SCRATCH BUILD")