From 33f5bf5ae760a7c815e39092a216f42ffcc42fbb Mon Sep 17 00:00:00 2001 From: Aric Gardner Date: Tue, 17 Nov 2020 14:45:48 -0500 Subject: [PATCH] Make sandbox a switch This was Andys suggestion previously it makes sense. Issue-Id: RELENG-3036 Signed-off-by: Aric Gardner Change-Id: I106737c6c766fb566a2e0e74436f5bb5da36eac5 --- jenkins-admin/create_jenkins_clouds_openstack_yaml.py | 9 +++++++-- jenkins-admin/create_jenkins_global_env_vars.py | 7 +++++-- 2 files changed, 12 insertions(+), 4 deletions(-) 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"), -- 2.16.6