Created
January 7, 2019 08:07
-
-
Save kumbasar/bec239e854fd76475518e08a264a8c0e to your computer and use it in GitHub Desktop.
A python script to get the junit data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import requests | |
| import urllib3 | |
| import json | |
| from requests.auth import HTTPBasicAuth | |
| urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) | |
| JENKINS_URL = os.environ['JENKINS_URL'] | |
| JENKINS_API_TOKEN = os.environ['JENKINS_API_TOKEN'] | |
| JENKINS_USER = os.environ['JENKINS_USER'] | |
| resp = requests.get(JENKINS_URL, auth=HTTPBasicAuth(JENKINS_USER, JENKINS_API_TOKEN),verify=False) | |
| data = resp.json() | |
| print(str(data['failCount'])) | |
| print(str(data['passCount'])) | |
| print(str(data['skipCount'])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment