* Potentially solved merge conflict

* Update pkg/model/planner.go

Based on feedback

Co-authored-by: Ryan (hackercat) <[email protected]>

* Fixed compilation error

* added missed test

* Fixed spelling error to work with lint error

Co-authored-by: Ryan (hackercat) <[email protected]>
Co-authored-by: Casey Lee <[email protected]>
This commit is contained in:
authored and GitHub committed 2021-05-05 13:04:03 -07:00
1 parent 596e518fe9
commit aba4fec0ee
5 files changed
+87 -6

No files matched your search

+4 -4
View File
@@ -229,7 +229,7 @@ func (rc *RunContext) newStepExecutor(step *model.Step) common.Executor {
Success: true,
Outputs: make(map[string]string),
}
runStep, err := rc.EvalBool(sc.Step.If)
runStep, err := rc.EvalBool(sc.Step.If.Value)
if err != nil {
common.Logger(ctx).Errorf(" \u274C Error in if: expression - %s", sc.Step)
@@ -243,7 +243,7 @@ func (rc *RunContext) newStepExecutor(step *model.Step) common.Executor {
}
if !runStep {
log.Debugf("Skipping step '%s' due to '%s'", sc.Step.String(), sc.Step.If)
log.Debugf("Skipping step '%s' due to '%s'", sc.Step.String(), sc.Step.If.Value)
return nil
}
@@ -298,13 +298,13 @@ func (rc *RunContext) platformImage() string {
func (rc *RunContext) isEnabled(ctx context.Context) bool {
job := rc.Run.Job()
l := common.Logger(ctx)
runJob, err := rc.EvalBool(job.If)
runJob, err := rc.EvalBool(job.If.Value)
if err != nil {
common.Logger(ctx).Errorf(" \u274C Error in if: expression - %s", job.Name)
return false
}
if !runJob {
l.Debugf("Skipping job '%s' due to '%s'", job.Name, job.If)
l.Debugf("Skipping job '%s' due to '%s'", job.Name, job.If.Value)
return false
}