Allow to set custom label for testplan in TestRail

Add posibilty to set custom label for new testplan
in TestRail while uploading tests results from CI.

Change-Id: I3a640c58e5dde0f191358d483eb629ad174e1bfc
Partial-bug: #1511467
This commit is contained in:
Artem Panchenko 2015-10-29 19:01:41 +02:00 committed by tatyana-leontovich
parent c1ab3a2d0b
commit 8b2b162c5a
1 changed files with 8 additions and 0 deletions

View File

@ -158,6 +158,14 @@ def get_version_from_parameters(jenkins_build_data):
upstream_build = Build(upstream_job_name, upstream_build_number)
return get_version_from_artifacts(upstream_build.build_data)
custom_version = get_job_parameter(jenkins_build_data, 'CUSTOM_VERSION')
if custom_version:
swarm_timestamp = jenkins_build_data['timestamp'] / 1000 \
if 'timestamp' in jenkins_build_data else None
return (TestRailSettings.milestone,
time.strftime("%D %H:%M", time.localtime(swarm_timestamp)),
custom_version)
def get_version_from_artifacts(jenkins_build_data):
version = yaml.load(get_build_artifact(