Complicated title, let me explain.
I want to limit an automatic POST hook when I push to the master
branch; so it won't fire when I push to the dev
branch. This is so the app will only deploy to the live servers when the changes have been merged with master
and the new master
passes the unit tests.
Is this possible?
You can't limit when BitBucket fires its POST hook; but you can use the contents of the POST to make the decision about whether or not to proceed with the deployment. Just parse the JSON that BitBucket sends you and only continue if any of the "commits"
elements have a "branch"
of "master", for example.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With