update apphub redeploy

This commit is contained in:
qiaofeng1227 2024-11-04 16:03:37 +08:00
parent d8a45cbc3f
commit a36d172e4a

View file

@ -1,3 +1,4 @@
from datetime import datetime
import json import json
import threading import threading
@ -372,7 +373,10 @@ class PortainerAPI:
path=f"stacks/{stackID}/git/redeploy", path=f"stacks/{stackID}/git/redeploy",
params={"endpointId": endpointId}, params={"endpointId": endpointId},
json={ json={
"env":[], "env":[{
"name": "DEPLOY_TIME",
"value": "-"+datetime.now().strftime("%Y%m%d%H%M%S")
}],
"prune":False, "prune":False,
"RepositoryReferenceName":"", "RepositoryReferenceName":"",
"RepositoryAuthentication":True, "RepositoryAuthentication":True,