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 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,