My particular git branching strategy includes dedicated branches for environments. I.E. I have a prod branch for deployment to the production environment and a staging branch to deploy to the staging environment.
I also have Jenkins jobs configured to poll these branches and deploy to their respective environments. I recently attempted to set up a workflow in JIRA to trigger a transition upon pull request merge to advance a referrenced JIRA issue to a particular status. In this case, I am trying to have the trigger advance the issue to the "Deployed to Staging" on the pull request merge to the Staging branch only. This doesn't seem to be happening. Is there something I am missing here? Is there some way to configure the trigger to only look at the staging branch?
Though the whole internet is saying it isn't possible, it is in fact possible without smart commits but with some more engeneering and a little mind-shift:
Example:
Say you have this workflow: (status) [Trigger]
Now, let's look at the triggers:
When you attach all these transitions to the "from all" transition the first merged PR will move the ticket to done, and the second PR created will move the ticket back to "in review" no matter what. That's not what you want.
If you define individual transitions and define the trigger there, it works like a filter.
The triggers they have on transitions are too limited. You will have to enable Smart Commits and leverage that. It will be more flexible, but not as automatic. In your commit comment you will have to enter commands such as: <Card ID> #deployed-to-staging <comment> (for your example above)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.