From: Aric Gardner Date: Tue, 17 Nov 2020 19:45:48 +0000 (-0500) Subject: Make sandbox a switch X-Git-Tag: v0.59.0~3 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=33f5bf5ae760a7c815e39092a216f42ffcc42fbb;p=releng%2Fglobal-jjb.git Make sandbox a switch This was Andys suggestion previously it makes sense. Issue-Id: RELENG-3036 Signed-off-by: Aric Gardner Change-Id: I106737c6c766fb566a2e0e74436f5bb5da36eac5 --- diff --git a/jenkins-admin/create_jenkins_clouds_openstack_yaml.py b/jenkins-admin/create_jenkins_clouds_openstack_yaml.py index 2d81a250..ae51bd8e 100755 --- a/jenkins-admin/create_jenkins_clouds_openstack_yaml.py +++ b/jenkins-admin/create_jenkins_clouds_openstack_yaml.py @@ -117,8 +117,13 @@ def parse_arguments(): parser.add_argument('--path', type=dir_path, help="Path to jenkins-admin directory") - parser.add_argument('--sandbox', type=bool, default=False, - help="Set to True for sandbox yaml generation") + + parser.add_argument( + "-s", "--sandbox", + help = "Is configuration being created for a sandbox", + dest = "sandbox", action = "store_true" + ) + return parser.parse_args() parsed_args = parse_arguments() diff --git a/jenkins-admin/create_jenkins_global_env_vars.py b/jenkins-admin/create_jenkins_global_env_vars.py index 927a665c..bfab2974 100755 --- a/jenkins-admin/create_jenkins_global_env_vars.py +++ b/jenkins-admin/create_jenkins_global_env_vars.py @@ -23,8 +23,11 @@ def parse_arguments(): description='Create jcasc yaml from path to jenkins config dir.') parser.add_argument('--path', type=dir_path, help="Path to jenkins-admin directory") - parser.add_argument('--sandbox', type=bool, default=False, - help="Set to True for sandbox yaml generation") + parser.add_argument( + "-s", "--sandbox", + help="Is configuration being created for a sandbox", + dest="sandbox", action = "store_true" + ) parser.add_argument( "--outputvars", type=argparse.FileType("w"),