buildkite / feedback

Got feedback? Please let us know!
https://buildkite.com
25 stars 24 forks source link

How to skip a build step based on environment variable in Buldkite pipeline.yml file? #516

Open zhaoyi0113 opened 5 years ago

zhaoyi0113 commented 5 years ago

I have a pipeline.yml for buildkite CI which is:

steps:
  - label: "Test"
    command: test.sh
    skip: "$BUILDKITE_BRANCH == 'mybranch'"

I want to skip the build step if the branch name is mybranch but this setting doesn't seem to work in buildkite. This step is still run. I wonder how I can use environment variable in skip condition. I know I can check the environment inside test.sh script but I don't really want to do that.