From 5a8bbdbe4bb4de06040ffbeb1dbb02585bc44e17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20M=C3=A1tl?= Date: Mon, 24 Jun 2024 21:13:30 +0200 Subject: [PATCH] 0.1.15 --- developers_chamber/gitlab_utils.py | 2 ++ developers_chamber/scripts/gitlab.py | 3 ++- setup.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/developers_chamber/gitlab_utils.py b/developers_chamber/gitlab_utils.py index b2a57e5..f0d7ab5 100644 --- a/developers_chamber/gitlab_utils.py +++ b/developers_chamber/gitlab_utils.py @@ -49,3 +49,5 @@ def run_job( ) if response.status_code != 201: raise UsageError(f'GitLab error: {response.content.decode("utf-8")}') + else: + return response.json()["web_url"] diff --git a/developers_chamber/scripts/gitlab.py b/developers_chamber/scripts/gitlab.py index 495ee76..3769288 100644 --- a/developers_chamber/scripts/gitlab.py +++ b/developers_chamber/scripts/gitlab.py @@ -176,5 +176,6 @@ def run_job(api_url, token, project, branch, variables): Run a job in a GitLab project. """ variables = dict([var.split('=') for var in variables.split(',')]) if variables else [] - run_job_func(api_url, token, project, f'refs/heads/{branch}', variables) + ci_job_url = run_job_func(api_url, token, project, f'refs/heads/{branch}', variables) + click.echo(f"CI job was started: {ci_job_url}") \ No newline at end of file diff --git a/setup.py b/setup.py index 2934292..0e622d1 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name="developers-chamber", - version="0.1.14", + version="0.1.15", description="A small plugin which help with development, deployment, git", keywords="django, skripts, easy live, git, bitbucket, Jira", author="Druids team",