mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Merge branch 'mr/refactor-task-stage' into mr/policy-evaluation
# Conflicts: # internal/cloud/backend_taskStages.go
This commit is contained in:
commit
4d2e75bbda
@ -62,18 +62,18 @@ func (trs *taskResultSummarizer) Summarize(context *IntegrationContext, output I
|
|||||||
func summarizeTaskResults(taskResults []*tfe.TaskResult) *taskResultSummary {
|
func summarizeTaskResults(taskResults []*tfe.TaskResult) *taskResultSummary {
|
||||||
var pendingCount, errCount, errMandatoryCount, passedCount int
|
var pendingCount, errCount, errMandatoryCount, passedCount int
|
||||||
for _, task := range taskResults {
|
for _, task := range taskResults {
|
||||||
if task.Status == "unreachable" {
|
if task.Status == tfe.TaskUnreachable {
|
||||||
return &taskResultSummary{
|
return &taskResultSummary{
|
||||||
unreachable: true,
|
unreachable: true,
|
||||||
}
|
}
|
||||||
} else if task.Status == "running" || task.Status == "pending" {
|
} else if task.Status == tfe.TaskRunning || task.Status == tfe.TaskPending {
|
||||||
pendingCount++
|
pendingCount++
|
||||||
} else if task.Status == "passed" {
|
} else if task.Status == tfe.TaskPassed {
|
||||||
passedCount++
|
passedCount++
|
||||||
} else {
|
} else {
|
||||||
// Everything else is a failure
|
// Everything else is a failure
|
||||||
errCount++
|
errCount++
|
||||||
if task.WorkspaceTaskEnforcementLevel == "mandatory" {
|
if task.WorkspaceTaskEnforcementLevel == tfe.Mandatory {
|
||||||
errMandatoryCount++
|
errMandatoryCount++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user