Skip to content

Commit a407813

Browse files
authored
Fix buildpipe not working if any attributes are used on the wait step (#91)
* Fix buildpipe not working if any attributes are used on the wait step * add tests
1 parent 3c081f6 commit a407813

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

pipeline.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,9 @@ func generatePipeline(steps []interface{}, pipelineEnv map[string]string, projec
104104

105105
env, foundEnv := stepMap["env"].(map[interface{}]interface{})
106106
_, foundBlockStep := stepMap["block"].(string)
107+
_, foundWaitStep := stepMap["wait"]
107108

108-
if !foundBlockStep {
109+
if !foundBlockStep && !foundWaitStep {
109110
if !foundEnv {
110111
env = make(map[interface{}]interface{})
111112
stepMap["env"] = env

tests/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ COPY . .
77
RUN make clean
88
RUN make build-linux
99

10-
FROM buildkite/plugin-tester
10+
FROM buildkite/plugin-tester:v1.1.0
1111

1212
COPY . .
1313

tests/dynamic_pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ steps: # the same schema as regular buildkite pipeline steps
2828
command:
2929
- cd $$BUILDPIPE_PROJECT_PATH # BUILDPIPE_PROJECT_PATH will be set by buildpipe
3030
- make test
31-
- wait
31+
- wait: ~
3232
- label: build
3333
branches: "master"
3434
env:

tests/post-command.bats

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ steps:
5151
TEST_ENV_PROJECT: test-project
5252
key: test:project1
5353
label: test project1
54-
- wait
54+
- wait: null
5555
- agents:
5656
- queue=build
5757
branches: master

0 commit comments

Comments
 (0)