How can I detect if a workflow has been manually triggered for Bitbucket in my config.yml?
I would expect to be able to differentiate between commits and manual triggers using pipeline.trigger_source (Pipeline values and parameters - CircleCI), but the value of this is always ‘webhook’ both for commit triggers and manual triggers from the UI.
For gitlab there is pipeline.trigger_parameters.circleci.event_type, but for Bitbucket that doesn’t exist.
We run certain jobs in our workflows bases on which directories changed in the repo. So manually triggering such workflow won’t run those jobs as the repo didn’t change. So we want to detect if the workflow was triggered from the UI, so we can overrule this directory change check.
However, if you are using - run: echo << pipeline.trigger_source >>, this should be returning the correct trigger type whether it was from a webhook or from an API trigger such as our Trigger Pipeline button or via our API endpoint.
If you have some examples of this not working correctly, can you please submit a support ticket so that our team can look further into it? A video of you clicking the Trigger Pipeline button and then calling that API endpoint for the trigger.type would be most beneficial.