From a36d172e4ae5019f0e40bcf71afb122ac6a63595 Mon Sep 17 00:00:00 2001 From: qiaofeng1227 <27513732@qq.com> Date: Mon, 4 Nov 2024 16:03:37 +0800 Subject: [PATCH] update apphub redeploy --- apphub/src/external/portainer_api.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apphub/src/external/portainer_api.py b/apphub/src/external/portainer_api.py index ae18dc3d..66f0e773 100755 --- a/apphub/src/external/portainer_api.py +++ b/apphub/src/external/portainer_api.py @@ -1,3 +1,4 @@ +from datetime import datetime import json import threading @@ -372,7 +373,10 @@ class PortainerAPI: path=f"stacks/{stackID}/git/redeploy", params={"endpointId": endpointId}, json={ - "env":[], + "env":[{ + "name": "DEPLOY_TIME", + "value": "-"+datetime.now().strftime("%Y%m%d%H%M%S") + }], "prune":False, "RepositoryReferenceName":"", "RepositoryAuthentication":True,