Make sandbox a switch 90/66090/1
authorAric Gardner <agardner@linuxfoundation.org>
Tue, 17 Nov 2020 19:45:48 +0000 (14:45 -0500)
committerAric Gardner <agardner@linuxfoundation.org>
Tue, 17 Nov 2020 19:47:18 +0000 (14:47 -0500)
This was Andys suggestion previously
it makes sense.

Issue-Id: RELENG-3036
Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Change-Id: I106737c6c766fb566a2e0e74436f5bb5da36eac5

jenkins-admin/create_jenkins_clouds_openstack_yaml.py
jenkins-admin/create_jenkins_global_env_vars.py

index 2d81a25..ae51bd8 100755 (executable)
@@ -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()
index 927a665..bfab297 100755 (executable)
@@ -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"),