Skip to content

Commit

Permalink
add tag support for result sut (#13)
Browse files Browse the repository at this point in the history
* add tag(s) support for result sut
  • Loading branch information
jupe authored Nov 4, 2021
1 parent 98dadb2 commit 12949e6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pytest_opentmi/OpenTmiReport.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ def _new_result(self, report):
result.execution.environment.framework.version = __pytest_info__.version
result.execution.sut.commit_id = os.environ.get('GIT_COMMIT', "")
result.execution.sut.branch = os.environ.get('GIT_BRANCH', "")
result.execution.sut.git_url = os.environ.get('GIT_URL', "")
# there might be multiple tags so split by ','
tag = os.environ.get('GIT_TAG', '')
tag = list(filter(None, tag.split(','))) # cleanup empty items
result.execution.sut.tag = tag
result.job.id = os.environ.get('BUILD_TAG', str(uuid.uuid1()))
result.campaign = os.environ.get('JOB_NAME', "")
if report.user_properties:
Expand Down

0 comments on commit 12949e6

Please sign in to comment.