The reason of failed jenkins job in cluster-under-test will be shown in a test result
PROD-36050
Change-Id: I1160d46e99751f4e714c459e3d07110958c913e3
diff --git a/tcp_tests/managers/drivetrain_manager.py b/tcp_tests/managers/drivetrain_manager.py
index 3851e8d..f65892e 100644
--- a/tcp_tests/managers/drivetrain_manager.py
+++ b/tcp_tests/managers/drivetrain_manager.py
@@ -49,11 +49,14 @@
Method accept any param:
job_parameters=None,
job_output_prefix='',
+ jenkins_tgt='I@salt:master' or
+ 'I@docker:client:stack:jenkins and cid01*'
start_timeout=1800,
build_timeout=3600 * 4,
verbose=False
:param job_name: string
+ :param jenkins_tgt: string, node to run jenkins in salt-style
:return: string, Result of passed job, "SUCCESS"| "FAILED" | "UNSTABLE"
"""
jenkins_url, jenkins_user, jenkins_pass = self.get_jenkins_creds(
@@ -76,12 +79,13 @@
LOG.info(description)
LOG.info('\n'.join(stages))
+ job_description = "{description}. \n\n{stages}"\
+ .format(description=description,
+ stages='\n'.join(stages))
+
if job_result != 'SUCCESS':
LOG.warning("{0}\n{1}".format(description, '\n'.join(stages)))
- return job_result
-
- def start_job_on_cfg_jenkins(self):
- pass
+ return job_result, job_description
def get_jenkins_creds(self, tgt):
"""