I want my pipelines to trigger only when certain type of commit happens and wonder if a simple one liner if expression like the one below can do it.
steps:
- label: "Deploy ... To ..."
if: $$(build.message | conventional-commits-parser | jq '.[0].type') =~ (feat|fix|perf)
command: |
pnpm install --frozen-lockfile --prod=false
The expression works inside a sample shell file but not in buildkite environment. It raises:
Error parsing `if` expression: Unexpected `(`: