I know this question is a little old. But, I ran across it while looking for a solution myself. I did find that Bitbucket has a feature, that fit my needs, and matches this question (I think) in this post, Adding human interaction back into automated builds
For my use case, I wanted an ability to run shell commands through a custom pipeline to do minor troubleshooting. For example, an "ifconfig" or a "nslookup". Rather simple troubleshooting steps, but within the scope of my container. An example of how I am using this in my code is like this:
pipelines:
default:
...
custom:
Troubleshooting:
- variables:
- name: COMMAND
- step:
name: Custom Troubleshooting Commands
image: *image
runs-on: *runs-on
deployment: dev
script:
- $COMMAND