feat(deploy): set timeout via label (!290)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Solves coop-cloud/organising#437 A timeout can be specified globally for a recipe using this label: `coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-120}`. This sets the default timeout to 120s. An app specific timeout can be set using the env `TIMEOUT`. Co-authored-by: Moritz <moritz.m@local-it.org> Reviewed-on: coop-cloud/abra#290
This commit is contained in:
@ -161,6 +161,12 @@ func DeployAction(c *cli.Context) error {
|
||||
logrus.Warn("skipping domain checks as requested")
|
||||
}
|
||||
|
||||
stack.WaitTimeout, err = config.GetTimeoutFromLabel(compose, stackName)
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
logrus.Debugf("set waiting timeout to %d s", stack.WaitTimeout)
|
||||
|
||||
if err := stack.RunDeploy(cl, deployOpts, compose, app.Name, DontWaitConverge); err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user