From fb16a97bcfa66beca43776c46da674f558faf3f9 Mon Sep 17 00:00:00 2001 From: baalajimaestro Date: Fri, 24 Feb 2023 22:31:54 +0530 Subject: [PATCH] Dont create tags anymore for triggering new builds Signed-off-by: baalajimaestro --- trigger.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/trigger.py b/trigger.py index 7570136..e690ea2 100644 --- a/trigger.py +++ b/trigger.py @@ -8,7 +8,6 @@ from git import Repo import subprocess import os -from time import time from requests import post from pathlib import Path @@ -23,9 +22,7 @@ gitlab_token = os.environ.get("GITLAB_TOKEN") cwd = os.getcwd() path = Path(cwd) base_dir = str(path.parent.absolute()) -current_time = str(int(time())) repo = Repo(base_dir) -repo.create_tag(current_time) # Nuke the remote if it existed try: @@ -39,7 +36,7 @@ repo.create_remote( ) # Push the newly created tag -repo.git.push("pushback", current_time) +repo.git.push("pushback", "HEAD:prod", force=True) # Trigger site rebuild data = {"token": gitlab_token, "ref": "source"}