Lava: Get the Lava API key from the environment rather than the cli arguments
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Wed, 21 Dec 2016 21:26:13 +0000 (16:26 -0500)
committerFrancis Deslauriers <francis.deslauriers@efficios.com>
Wed, 18 Jan 2017 19:44:17 +0000 (14:44 -0500)
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
scripts/lttng-baremetal-tests/lava-submit.py
scripts/lttng-baremetal-tests/run-baremetal-benchmarks.sh
scripts/lttng-baremetal-tests/run-baremetal-tests.sh
scripts/lttng-baremetal-tests/run-kvm-tests.sh

index 36f6fb5ffd462bb073ddbec0cd09e0ce8460eccb..2115718acb2cafbbff91165a3eabadeb100e4b65 100644 (file)
@@ -338,7 +338,6 @@ def main():
     parser.add_argument('-k', '--kernel', required=True)
     parser.add_argument('-km', '--kmodule', required=True)
     parser.add_argument('-lm', '--lmodule', required=True)
-    parser.add_argument('-l', '--lava-key', required=True)
     parser.add_argument('-tc', '--tools-commit', required=True)
     parser.add_argument('-uc', '--ust-commit', required=False)
     args = parser.parse_args()
@@ -353,6 +352,13 @@ def main():
         print('argument -t/--type {} unrecognized. Exiting...'.format(args.type))
         return -1
 
+    lava_api_key = None
+    try:
+        lava_api_key = os.environ['LAVA_FRDESO_TOKEN']
+    except Exception, e:
+        print('LAVA_FRDESO_TOKEN not found in the environment variable. Exiting...')
+        return -1
+
     if test_type is TestType.baremetal_benchmarks:
         j = create_new_job(args.jobname, build_device='x86')
         j['actions'].append(get_deploy_cmd_x86(args.jobname, args.kernel, args.kmodule, args.lmodule))
@@ -389,7 +395,7 @@ def main():
     else:
         assert False, 'Unknown test type'
 
-    server = xmlrpclib.ServerProxy('http://%s:%s@%s/RPC2' % (USERNAME, args.lava_key, HOSTNAME))
+    server = xmlrpclib.ServerProxy('http://%s:%s@%s/RPC2' % (USERNAME, lava_api_key, HOSTNAME))
 
     jobid = server.scheduler.submit_job(json.dumps(j))
 
index 4e2a1ee8e6a5cd0659a7df4b8acb8c19a69c0821..724afa6f9afa447c006b66d826b6d0c8bde7647d 100644 (file)
@@ -18,11 +18,9 @@ echo 'At this point, we built the modules and kernel if we needed to.'
 echo 'We can now launch the lava job using those artefacts'
 git clone https://github.com/lttng/lttng-ci
 
-set +x
 python lttng-ci/scripts/lttng-baremetal-tests/lava-submit.py \
                           -t baremetal-benchmarks \
                           -j "$JOB_NAME" \
-                          -l "$LAVA_FRDESO_TOKEN" \
                           -k "$STORAGE_KERNEL_IMAGE" \
                           -km "$STORAGE_LINUX_MODULES" \
                           -lm "$STORAGE_LTTNG_MODULES" \
index abe5619aa6e1c73df64afd07abb652b2f8641e43..da991f4435f6ab337b66495df8407bf6ad9e2ce8 100644 (file)
@@ -18,11 +18,9 @@ echo 'At this point, we built the modules and kernel if we needed to.'
 echo 'We can now launch the lava job using those artefacts'
 git clone https://github.com/lttng/lttng-ci
 
-set +x
 python lttng-ci/scripts/lttng-baremetal-tests/lava-submit.py \
                           -t baremetal-tests \
                           -j "$JOB_NAME" \
-                          -l "$LAVA_FRDESO_TOKEN" \
                           -k "$STORAGE_KERNEL_IMAGE" \
                           -km "$STORAGE_LINUX_MODULES" \
                           -lm "$STORAGE_LTTNG_MODULES" \
index 417a5e5745efc64ce07d9afc1497d6621454ebba..8b52fe18a91f20a8e5c8a290565f1dd1450fc64f 100644 (file)
@@ -18,11 +18,9 @@ echo 'At this point, we built the modules and kernel if we needed to.'
 echo 'We can now launch the lava job using those artefacts'
 git clone https://github.com/lttng/lttng-ci
 
-set +x
 python lttng-ci/scripts/lttng-baremetal-tests/lava-submit.py \
                           -t kvm-tests \
                           -j "$JOB_NAME" \
-                          -l "$LAVA_FRDESO_TOKEN" \
                           -k "$STORAGE_KERNEL_IMAGE" \
                           -km "$STORAGE_LINUX_MODULES" \
                           -lm "$STORAGE_LTTNG_MODULES" \
This page took 0.024867 seconds and 4 git commands to generate.