Hello,
I want to start a custom pipeline from another pipeline, but I want it to be activated by the same user who activated the initial pipeline on the same branch and the same repository. It looks reasonable to me that it should be possible without creating additional users and app passwords in that case. A user is running the pipeline already, right? Why does he need extra authentication? :-)
For Pull-Request reports delivery there's a possibility to send requests with curl using proxy server (http://localhost:29418) bypassing the credentials verification. Is it possible to use the same approach to trigger pipelines?
Here's what I tried (without success, but works fine when replacing proxy parameter user credentials):
curl --proxy 'http://localhost:29418'
-X POST -is -H 'Content-Type:application/json'
https://api.bitbucket.org/2.0/repositories/$BITBUCKET_REPO_OWNER/$BITBUCKET_REPO_SLUG/pipelines/
-d '{
"target":{
"type":"pipeline_ref_target",
"ref_type":"branch",
"ref_name":"$BITBUCKET_BRANCH",
"selector":{"type":"custom","pattern":"Run autotests"}}
}'
Thanks!
Hi Mikhail and welcome to the community.
The current proxy only works for pushing back to the repo where Pipelines is running during a Pipelines build, and also with the reports and annotations API endpoints. It is not designed to work with any other endpoints, so I'm afraid that what you're asking is not possible at the moment.
You will need to use authentication in the API call. You can also use the following pipe to trigger another pipeline:
That also requires a username and app password for authentication.
I can create a feature request in our issue tracker about what you're asking, for our product managers and development team to consider. Please feel free to let me know if you'd like me to do that.
Kind regards,
Theodora
Hi Theodora,
Thank you for your response! I've already implemented it using dedicated user's credentials.
All the same, I still think it may be a nice to have feature, because it allows getting rid of that extra user and app password.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mikhail,
Thank you for your reply and feedback
I went ahead and created a feature request in our issue tracker:
I would suggest adding your vote to the feature request (by selecting the Vote for this issue link) as the number of votes helps the development team and product managers better understand the demand for new features.
You are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the Start watching this issue link) if you'd like to get notified via email on updates.
Implementation of new features is done as per our policy here and any updates will be posted in the feature request.
Please feel free to let me know if you have any questions.
Kind regards,
Theodora
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.
You are very welcome Mikhail! Please feel free to reach out if you ever need anything else.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.