Upload to GitLab

This commit is contained in:
Nyeki.py
2024-12-26 01:00:35 -03:00
parent 4ef575b391
commit 11fad1c270
14 changed files with 123 additions and 62 deletions
+4 -4
View File
@@ -16,7 +16,7 @@ username = input("Username for git.nyeki.dev: ")
password = getpass.getpass("Password for git.nyeki.dev: ")
tags = requests.get(
"https://git.nyeki.dev/v2/payphone/payphone-shard/tags/list",
"https://registry.nyeki.dev/v2/payphone/payphone-shard/tags/list",
auth=(username, password),
).json()["tags"]
@@ -35,12 +35,12 @@ print(f"Updating to tag v{latest_version}...")
os.system(f"git pull https://{username}:{password}@git.nyeki.dev/payphone/payphone")
os.system(
f"microk8s kubectl set image sts/bot bot=git.nyeki.dev/payphone/payphone-shard:v{latest_version}"
f"microk8s kubectl set image sts/bot bot=registry.nyeki.dev/payphone/payphone/shard:v{latest_version}"
)
os.system(
f"""
microk8s kubectl set image pod/tasks \
connect=git.nyeki.dev/payphone/payphone-shard:v{latest_version} \
expire=git.nyeki.dev/payphone/payphone-shard:v{latest_version} \
connect=registry.nyeki.dev/payphone/payphone/shard:v{latest_version} \
expire=registry.nyeki.dev/payphone/payphone/shard:v{latest_version} \
"""
)
+2 -2
View File
@@ -20,12 +20,12 @@ version_num = version[1]
targets = ["tasks", "shard"]
for t in targets:
tag = f"git.nyeki.dev/payphone/payphone-{t}:v{version_num}"
tag = f"registry.nyeki.dev/payphone/payphone/{t}:v{version_num}"
os.system(f"docker build --target {t} --tag {tag} .")
os.system(f"docker push {tag}")
tag = f"git.nyeki.dev/payphone/payphone-{t}:latest"
tag = f"registry.nyeki.dev/payphone/payphone/{t}:latest"
os.system(f"docker build --target {t} --tag {tag} .")
os.system(f"docker push {tag}")