Trigger Bitbucket Pipeline based on hashtag in commit message

Viewed 213

I have a pipeline that builds every time I push code to the repo. What I want to do is tigger the build based on a hashtag in the commit message. For example:

git add .
git commit -m "#slsdeploy"
git push

Any message (other than #slsdeploy) will just be the typical push to the repo. Below is my pipeline:

image: node:alpine

pipelines:
  branches:
    master:
      - step:
          caches:
            - node
          script:
            - npm install -g serverless
            - serverless plugin install -n serverless-offline
            - serverless config credentials --provider aws --key ${AWS} --secret ${AWS}
            - serverless deploy

I've tried to research this and I have not found any information on how to do this.

Any help would be greatly appreciated

0 Answers
Related