From 0332d2f61234682e46995306f02ad0c8e3f50634 Mon Sep 17 00:00:00 2001 From: baalajimaestro Date: Sun, 25 Sep 2022 13:03:02 +0530 Subject: [PATCH] Fetch repo id from env vars Signed-off-by: baalajimaestro --- trigger.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/trigger.py b/trigger.py index 6c5e089..fb16100 100644 --- a/trigger.py +++ b/trigger.py @@ -15,6 +15,7 @@ repo = Repo(os.getcwd()) base_repo_user = os.environ.get("BASE_REPO_USERNAME") base_repo_pass = os.environ.get("BASE_REPO_PASSWORD") content_repo_git = os.environ.get("CONTENT_REPO_GIT") +content_repo_id = os.environ.get("CONTENT_REPO_ID") gitlab_token = os.environ.get("GITLAB_TOKEN") repo.create_tag(current_time) @@ -26,4 +27,4 @@ repo.git.push('pushback', current_time) data = {"token": gitlab_token, "ref": "source"} -post("https://git.baalajimaestro.me/api/v4/projects/7/trigger/pipeline", json = data) \ No newline at end of file +post(f"https://git.baalajimaestro.me/api/v4/projects/{content_repo_id}/trigger/pipeline", json = data) \ No newline at end of file