buildpipe-buildkite-plugin
buildpipe-buildkite-plugin copied to clipboard
feat: improve depends_on in workspace steps
Currently, if a workspace step depends on a project step, the plugin will generate an incorrect pipeline. For example:
- label: build
key: build
branches: "master"
env:
BUILDPIPE_SCOPE: project
TEST_ENV_STEP: test-step
command:
- cd $$BUILDPIPE_PROJECT_PATH
- make build
- make publish-image
agents:
- queue=build
depends_on:
- bootstrap # the rendered template should not include the project name for a non-project step
- test # the rendered template should include the project name for a project-scoped step
- label: tag
branches: "master"
depends_on:
- bootstrap
- build
depends_on in tag step won't be updated into build:project1 and build:project2.
This PR aims to improve this behaviour. Please take a look at the test to see how it will be updated.
Note: make quality stops working with the latest version of golangci-lint so I added .golangci.yaml and updates some code to fix some lint error.