-
Notifications
You must be signed in to change notification settings - Fork 7
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
Allow block step #9
Conversation
pipeline.go
Outdated
// Block and wait steps must not contains agents or env, so we return early here | ||
_, hasBlockStep := step["block"] | ||
_, hasWaitStep := step["wait"] | ||
if hasBlockStep || hasWaitStep { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would call it isBlockStep and isWaitStep rather than hasBlockStep and hasWaitStep.
pipeline_test.go
Outdated
t.Error("lowerStep returned err:", err) | ||
} | ||
if !reflect.DeepEqual(step["env"], nil) { | ||
t.Errorf("env should not be set for a wait step") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
t.Errorf("env should not be set for a wait step") | |
t.Errorf("env should not be set for a block step") |
pipeline_test.go
Outdated
t.Errorf("env should not be set for a wait step") | ||
} | ||
if !reflect.DeepEqual(step["agents"], nil) { | ||
t.Errorf("agents should not be set for a wait step") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
t.Errorf("agents should not be set for a wait step") | |
t.Errorf("agents should not be set for a block step") |
Block step was not allowed in
.jobsworth.yml
, because Jobsworth automatically adds theenv
andagents
fields to every step, which are invalid fields for theblock
step.