Sould not set BUILD_ID in Jenkins (https://wiki.jenkins-ci.org/display/JENKINS/Proces...
authorYaroslav Brustinov <[email protected]>
Mon, 20 Mar 2017 11:53:06 +0000 (13:53 +0200)
committerYaroslav Brustinov <[email protected]>
Mon, 20 Mar 2017 11:53:06 +0000 (13:53 +0200)
Change-Id: I0a539ab767217f19dda612d262255ce7a9afb1e7
Signed-off-by: Yaroslav Brustinov <[email protected]>
scripts/automation/regression/aggregate_results.py
scripts/automation/regression/trex_unit_test.py

index 05bb001..53e9b1c 100755 (executable)
@@ -261,7 +261,7 @@ if __name__ == '__main__':
 
     scenario                = os.environ.get('SCENARIO')
     build_url               = os.environ.get('BUILD_URL')
-    build_id                = os.environ.get('BUILD_ID')
+    build_id                = os.environ.get('BUILD_NUM')
     trex_repo               = os.environ.get('TREX_CORE_REPO')
     last_commit_info_file   = os.environ.get('LAST_COMMIT_INFO')
     last_commit_branch_file = os.environ.get('LAST_COMMIT_BRANCH')
@@ -272,7 +272,7 @@ if __name__ == '__main__':
     if not build_url:
         print('Warning: no environment variable BUILD_URL')
     if not build_id:
-        print('Warning: no environment variable BUILD_ID')
+        print('Warning: no environment variable BUILD_NUM')
     if not python_ver:
         print('Warning: no environment variable PYTHON_VER')
 
index 8c07498..a28f1d8 100755 (executable)
@@ -458,7 +458,7 @@ class CTRexTestConfiguringPlugin(Plugin):
         elk_info['info'] =info;
 
         elk_info['timestamp'] = timestamp.strftime("%Y-%m-%d %H:%M:%S")  # need to update it
-        elk_info['build_id'] = os.environ.get('BUILD_ID')
+        elk_info['build_id'] = os.environ.get('BUILD_NUM')
         elk_info['scenario'] = os.environ.get('SCENARIO')
 
         CTRexScenario.elk_info = elk_info