feat: deploy.py makes latest version the default one.
This commit is contained in:
+9
-4
@@ -4,18 +4,23 @@ import getpass
|
||||
username = input("Username for git.nyeki.dev: ")
|
||||
password = getpass.getpass("Password for git.nyeki.dev: ")
|
||||
|
||||
latest_version = input("Latest version: ")
|
||||
latest_version = input("Latest version (empty for latest): ")
|
||||
|
||||
print(f"Updating to tag v{latest_version}...")
|
||||
if not latest_version.strip():
|
||||
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"microk8s kubectl set image sts/bot bot=registry.nyeki.dev/payphone/payphone/shard:v{latest_version}"
|
||||
f"microk8s kubectl set image sts/bot bot=registry.nyeki.dev/payphone/payphone/shard:{latest_version}"
|
||||
)
|
||||
os.system(
|
||||
f"""
|
||||
microk8s kubectl set image pod/tasks \
|
||||
connect=registry.nyeki.dev/payphone/payphone/tasks:v{latest_version}
|
||||
connect=registry.nyeki.dev/payphone/payphone/tasks:{latest_version}
|
||||
"""
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user