Skip to content

Commit

Permalink
Merge 4baed1b into a327082
Browse files Browse the repository at this point in the history
  • Loading branch information
mvidalgarcia committed Oct 28, 2019
2 parents a327082 + 4baed1b commit 8ba27a4
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions reana_workflow_controller/consumer.py
Expand Up @@ -91,14 +91,13 @@ def _update_commit_status(workflow, status):
state = "running"
secret_store = REANAUserSecretsStore(workflow.owner_id)
gitlab_access_token = secret_store.get_secret_value('gitlab_access_token')
target_url = REANA_URL + "/api/workflows/{0}/logs".format(workflow.id_)
commit_status_url = REANA_GITLAB_URL + "/api/v4/projects/{0}/" + \
"statuses/{1}?access_token={2}&state={3}&target_url={4}"
requests.post(commit_status_url.format(workflow.name,
workflow.git_ref,
gitlab_access_token,
state,
target_url))
target_url = f"https://{REANA_URL}/api/workflows/{workflow.id_}/logs"
commit_status_url = (
f"{REANA_GITLAB_URL}/api/v4/projects/{workflow.name}/statuses/"
f"{workflow.git_ref}?access_token={gitlab_access_token}&state={state}&"
f"target_url={target_url}"
)
requests.post(commit_status_url)


def _update_run_progress(workflow_uuid, msg):
Expand Down

0 comments on commit 8ba27a4

Please sign in to comment.