removed link to jenkins job in a PR

Signed-off-by: Anton Danchenko <ant.danchenko@gmail.com>
This commit is contained in:
Anton Danchenko 2019-03-12 10:32:50 +02:00
parent 2fd3ff798a
commit cf0afbca14
No known key found for this signature in database
GPG Key ID: C2D4819B698627E4
2 changed files with 1 additions and 14 deletions

View File

@ -1,11 +0,0 @@
import requests
def get_jenkins_build_url(pr_number: str) -> str:
jenkins_api_url = 'https://ci.status.im/job/end-to-end-tests/job/status-app-end-to-end-tests/'
builds_list = requests.get(jenkins_api_url + 'api/json?tree=builds[id,url]').json()[
'builds']
for build in builds_list:
data = requests.get('%s/%s/api/json' % (jenkins_api_url, build['id'])).json()
if data['displayName'] == 'PR-' + pr_number:
return build['url'] + '/console'

View File

@ -10,7 +10,6 @@ from datetime import datetime
from os import environ
from io import BytesIO
from sauceclient import SauceClient, SauceException
from support.api.jenkins_api import get_jenkins_build_url
from support.api.network_api import NetworkApi
from support.github_report import GithubHtmlReport
from support.testrail_report import TestrailReport
@ -157,8 +156,7 @@ def pytest_configure(config):
repo = Github(github_token).get_user('status-im').get_repo('status-react')
pull = repo.get_pull(int(pr_number))
pull.get_commits()[0].create_status(state='pending', context='Mobile e2e tests',
description='e2e tests are running',
target_url=get_jenkins_build_url(pr_number))
description='e2e tests are running')
if config.getoption('env') == 'sauce':
if not is_uploaded():
if 'http' in config.getoption('apk'):