Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Ivan Belyakov February 18, 2021

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

2 votes
Ivan Belyakov
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 11, 2021

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
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 19, 2021

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

Ivan Belyakov February 23, 2021

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

Ivan Belyakov
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 11, 2021

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

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 12, 2021

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
AUG Leaders

Atlassian Community Events