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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to get a link for Bitbucket Pipelines build artifacts to publish it on Confluence?

I would like to have a link to the latest binary that was built using Bitbucket Pipelines, so I could post this link in a Confluence article, so that teammates can always download the latest build artifact.

Even better if I could provide on Confluence a list of links to builds of different branches/tags.

I can not just forward them somehow to Downloads section of Bitbucket, since they must not have access to Bitbucket, only to Confluence.


How can I achieve that?

2 answers

Alright, I figured it out.

  1. Create a page on Confluence. I also used File list template on this page for better visual experience. See the page id in the URL after /pages/
  2. Create a token for accessing REST API - https://id.atlassian.com/manage-profile/security/api-tokens
  3. This is a link for a guide to add/update attachments - https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/#api-api-content-id-child-attachment-put . 'id' is your page id from step 1 above.
0 votes

Hi Ivan,

Bitbucket Pipelines artifacts can only be accessed by users with access to the repo where the build is running. If users don't have access to the repo, they cannot download artifacts.

If Confluence REST API provides an endpoint for uploading a file in a Confluence page, you could include in your Pipelines build an API call that will upload the binary you want to a Confluence page. Are you using a Confluence Cloud instance or a Server one (self-hosted)?

Kind regards,
Theodora

Hi Theodora, thank you for your response. I am using Confluence Cloud. How do I post the artifact to Confluence page? I couldn't find any information on this

Thank you for REST API hint, I posted an answer below

Hi @Ivan Belyakov ,

I am really sorry for not replying earlier, I somehow missed the notification of your reply from 23rd February.

I had asked whether you use Confluence Server or Cloud so I can check for the appropriate API endpoint, but it looks that you have found it already.

Thank you for posting it in your reply, and please feel free to let me know if you need anything further.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,810 views 10 16
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you