Skip to content

Commit

Permalink
fix(api): load pipelines when parsing workflow for an as code workflo…
Browse files Browse the repository at this point in the history
…w run (#4405)
  • Loading branch information
sguiheux committed Jun 28, 2019
1 parent cc82995 commit 89a0dc0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions engine/api/workflow/workflow_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ func ParseAndImport(ctx context.Context, db gorp.SqlExecutor, store cache.Store,
return nil, nil, errW
}

// Browse all node to find IDs
if err := IsValid(ctx, store, db, w, proj, u, LoadOptions{}); err != nil {
// Load deep pipelines if we come from workflow run ( so we have hook uuid ).
// We need deep pipelines to be able to run stages/jobs
if err := IsValid(ctx, store, db, w, proj, u, LoadOptions{DeepPipeline: opts.HookUUID != ""}); err != nil {
return nil, nil, sdk.WrapError(err, "Workflow is not valid")
}

Expand Down

0 comments on commit 89a0dc0

Please sign in to comment.