fix(create): hande non existing secret files
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
2bb27aadc4
commit
354f964e7d
@ -121,6 +121,9 @@ def copy_secrets(apps):
|
|||||||
container_id = container_by_service[s.name].id
|
container_id = container_by_service[s.name].id
|
||||||
for sec in app_secs:
|
for sec in app_secs:
|
||||||
src = f'/var/lib/docker/containers/{container_id}/mounts/secrets/{sec["SecretID"]}'
|
src = f'/var/lib/docker/containers/{container_id}/mounts/secrets/{sec["SecretID"]}'
|
||||||
|
if not Path(src).exists():
|
||||||
|
logging.error(f"For the secret {sec['SecretName']} the file {src} does not exist for {s.name}")
|
||||||
|
continue
|
||||||
dst = SECRET_PATH + sec['SecretName']
|
dst = SECRET_PATH + sec['SecretName']
|
||||||
copyfile(src, dst)
|
copyfile(src, dst)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user