Allow workflow to trigger based on git commit message

It would be useful to be able to trigger a job from a workflow based on a git commit message matching a pre defined regex. This could then be used to deploy code to a test server based on a commit message (i.e. "Some useful commit message #test001" would trigger a deploy to test server test001).

An example yaml may look something like this:

  version: 2
- test
- deploy:
- test
- ^.*#((test|dev)([0-9]{3}))$

In the above example, the deploy job would only trigger if the commit message contained a match (i.e. #test001).

The commit message (or matched regex) would also need to be made available via an environment variable in order for the job to know which server to deploy to (similar to the way the tag is stored in $CIRCLE_TAG).

  • Guest
  • Dec 13 2018
  • Not planned
  • Attach files
  • Guest commented
    29 Jun 10:23