use new enum string for task stages
This commit is contained in:
parent
e46683d2c7
commit
383da4893b
|
@ -372,7 +372,7 @@ in order to capture the filesystem context the remote workspace expects:
|
||||||
Run: r,
|
Run: r,
|
||||||
}
|
}
|
||||||
|
|
||||||
if stageID := getTaskStageIDByName(r.TaskStages, "pre_apply"); stageID != nil {
|
if stageID := getTaskStageIDByName(r.TaskStages, tfe.PreApply); stageID != nil {
|
||||||
err = b.runTasks(integration, integration.BeginOutput("Run Tasks (pre-apply)"), *stageID)
|
err = b.runTasks(integration, integration.BeginOutput("Run Tasks (pre-apply)"), *stageID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return r, err
|
return r, err
|
||||||
|
@ -383,9 +383,9 @@ in order to capture the filesystem context the remote workspace expects:
|
||||||
return r, nil
|
return r, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func getTaskStageIDByName(stages []*tfe.TaskStage, name string) *string {
|
func getTaskStageIDByName(stages []*tfe.TaskStage, stageName tfe.Stage) *string {
|
||||||
for _, stage := range stages {
|
for _, stage := range stages {
|
||||||
if stage.Stage == name {
|
if stage.Stage == stageName {
|
||||||
return &stage.ID
|
return &stage.ID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue