This commit is contained in:
Atul Bagga 2020-01-14 14:29:32 +05:30
Родитель 865b95d09a
Коммит f6e78d92c6
1 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -4,12 +4,16 @@
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
def poll_workflow_status(repo_name,check_run_id):
from knack.util import CLIError
from azext_aks_deploy.dev.common.github_api_helper import get_check_run_status_and_conclusion
def poll_workflow_status(repo_name, check_run_id):
import colorama
import humanfriendly
import time
check_run_status = None
check_run_status, check_run_conclusion= get_check_run_status_and_conclusion(repo_name, check_run_id)
check_run_status, check_run_conclusion = get_check_run_status_and_conclusion(repo_name, check_run_id)
if check_run_status == 'queued':
# When workflow status is Queued
colorama.init()
@ -36,4 +40,4 @@ def poll_workflow_status(repo_name,check_run_id):
if check_run_conclusion == 'success':
print('Workflow succeeded')
else:
raise CLIError('Workflow status: {}'.format(check_run_conclusion))
raise CLIError('Workflow status: {}'.format(check_run_conclusion))