Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,462,872
Community Members
 
Community Events
176
Community Groups

Trigger Custom Pipeline without credentials

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!

1 answer

1 accepted

0 votes
Answer accepted

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.

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

Thank you for it, Theodora! I did vote for it.

You are very welcome Mikhail! Please feel free to reach out if you ever need anything else.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events