Fetch repo id from env vars

Signed-off-by: baalajimaestro <me@baalajimaestro.me>
This commit is contained in:
baalajimaestro 2022-09-25 13:03:02 +05:30
parent f94546bf64
commit 0332d2f612
Signed by: baalajimaestro
GPG key ID: F93C394FE9BBAFD5

View file

@ -15,6 +15,7 @@ repo = Repo(os.getcwd())
base_repo_user = os.environ.get("BASE_REPO_USERNAME") base_repo_user = os.environ.get("BASE_REPO_USERNAME")
base_repo_pass = os.environ.get("BASE_REPO_PASSWORD") base_repo_pass = os.environ.get("BASE_REPO_PASSWORD")
content_repo_git = os.environ.get("CONTENT_REPO_GIT") 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") gitlab_token = os.environ.get("GITLAB_TOKEN")
repo.create_tag(current_time) repo.create_tag(current_time)
@ -26,4 +27,4 @@ repo.git.push('pushback', current_time)
data = {"token": gitlab_token, "ref": "source"} data = {"token": gitlab_token, "ref": "source"}
post("https://git.baalajimaestro.me/api/v4/projects/7/trigger/pipeline", json = data) post(f"https://git.baalajimaestro.me/api/v4/projects/{content_repo_id}/trigger/pipeline", json = data)