mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-08-05 06:18:54 +00:00
feat: Refine the Atlantis Info Message Logging (#5034)
Signed-off-by: Simon Heather <32168619+X-Guardian@users.noreply.github.com>
This commit is contained in:
@@ -154,7 +154,6 @@ func (a *APIController) apiPlan(request *APIRequest, ctx *command.Context) (*com
|
||||
for i, cmd := range cmds {
|
||||
err = a.PreWorkflowHooksCommandRunner.RunPreHooks(ctx, cc[i])
|
||||
if err != nil {
|
||||
ctx.Log.Err("Error running pre-workflow hooks %s.", err)
|
||||
if a.FailOnPreWorkflowHookError {
|
||||
return nil, err
|
||||
}
|
||||
@@ -163,10 +162,7 @@ func (a *APIController) apiPlan(request *APIRequest, ctx *command.Context) (*com
|
||||
res := a.ProjectPlanCommandRunner.Plan(cmd)
|
||||
projectResults = append(projectResults, res)
|
||||
|
||||
err = a.PostWorkflowHooksCommandRunner.RunPostHooks(ctx, cc[i])
|
||||
if err != nil {
|
||||
ctx.Log.Err("Error running post-workflow hooks %s.", err)
|
||||
}
|
||||
a.PostWorkflowHooksCommandRunner.RunPostHooks(ctx, cc[i]) // nolint: errcheck
|
||||
}
|
||||
return &command.Result{ProjectResults: projectResults}, nil
|
||||
}
|
||||
@@ -181,7 +177,6 @@ func (a *APIController) apiApply(request *APIRequest, ctx *command.Context) (*co
|
||||
for i, cmd := range cmds {
|
||||
err = a.PreWorkflowHooksCommandRunner.RunPreHooks(ctx, cc[i])
|
||||
if err != nil {
|
||||
ctx.Log.Err("Error running pre-workflow hooks %s.", err)
|
||||
if a.FailOnPreWorkflowHookError {
|
||||
return nil, err
|
||||
}
|
||||
@@ -190,10 +185,7 @@ func (a *APIController) apiApply(request *APIRequest, ctx *command.Context) (*co
|
||||
res := a.ProjectApplyCommandRunner.Apply(cmd)
|
||||
projectResults = append(projectResults, res)
|
||||
|
||||
err = a.PostWorkflowHooksCommandRunner.RunPostHooks(ctx, cc[i])
|
||||
if err != nil {
|
||||
ctx.Log.Err("Error running post-workflow hooks %s.", err)
|
||||
}
|
||||
a.PostWorkflowHooksCommandRunner.RunPostHooks(ctx, cc[i]) // nolint: errcheck
|
||||
}
|
||||
return &command.Result{ProjectResults: projectResults}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user