Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(pipeline): nil pointer when no defined pipeline #60

Merged
merged 1 commit into from
Apr 6, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(pipeline): nil pointer when no defined pipeline
  • Loading branch information
andrewrynhard committed Apr 6, 2018
commit 544677fd8d4479dd5c8fdd0f77d413cdffa600be
3 changes: 3 additions & 0 deletions pkg/pipeline/pipeline.go
Original file line number Diff line number Diff line change
@@ -22,6 +22,9 @@ type Pipeline struct {
// Build executes a docker build.
// nolint: gocyclo
func (p *Pipeline) Build(metadata *metadata.Metadata, stages map[string]*stage.Stage, tasks map[string]*task.Task) (err error) {
if p == nil {
return
}
for i, stageName := range p.Stages {
if _, ok := stages[stageName]; !ok {
return fmt.Errorf("Stage %q is not defined in conform.yaml", stageName)