feat(scripts): ✨ Make deploy.py use a tag instead of version number.
This commit is contained in:
+4
-9
@@ -5,23 +5,18 @@ import getpass
|
|||||||
username = input("Username for git.nyeki.dev: ")
|
username = input("Username for git.nyeki.dev: ")
|
||||||
password = getpass.getpass("Password for git.nyeki.dev: ")
|
password = getpass.getpass("Password for git.nyeki.dev: ")
|
||||||
|
|
||||||
latest_version = input("Latest version (empty for latest): ")
|
latest_tag = input("Latest tag (empty for latest): ") or "latest"
|
||||||
|
|
||||||
if not latest_version.strip():
|
print(f"Updating to tag {latest_tag}...")
|
||||||
latest_version = "latest"
|
|
||||||
else:
|
|
||||||
latest_version = "v" + latest_version.strip()
|
|
||||||
|
|
||||||
print(f"Updating to tag {latest_version}...")
|
|
||||||
|
|
||||||
os.system(f"git pull https://{username}:{password}@git.nyeki.dev/payphone/payphone")
|
os.system(f"git pull https://{username}:{password}@git.nyeki.dev/payphone/payphone")
|
||||||
os.system(
|
os.system(
|
||||||
f"microk8s kubectl set image sts/bot bot=registry.nyeki.dev/payphone/payphone/shard:{latest_version}"
|
f"microk8s kubectl set image sts/bot bot=registry.nyeki.dev/payphone/payphone/shard:{latest_tag}"
|
||||||
)
|
)
|
||||||
os.system(
|
os.system(
|
||||||
f"""
|
f"""
|
||||||
microk8s kubectl set image pod/tasks \
|
microk8s kubectl set image pod/tasks \
|
||||||
connect=registry.nyeki.dev/payphone/payphone/tasks:{latest_version}
|
connect=registry.nyeki.dev/payphone/payphone/tasks:{latest_tag}
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user