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

pipeline creating with cross project dependences

We have created a few projects (modules in terms of maven). when compiled they are dependent on other modules (projects in Jira with independent bitbucket repositories).

While the totally independent modules get compiled successfully, the modules which uses other modules/artifacts as dependencies get failed as they are not able to find the relevant dependencies. which considering the fact that the builds in bitbucket are executed in docker they are not persisted.

I tried using  $BITBUCKET_CLONE_DIR, but unfortunately not able to make any headway on how to use it, wherein we can refer these dependencies.

It would be great if somebody can point us to the right documentation and/or provide any help which can help us run these pipelines

1 answer

0 votes
Ronald C_ Atlassian Team Apr 18, 2020

Hi @VIVEK JAIN

Hope you're doing well. :)

If I understand your request correctly, you would like the generated dependencies to be shared across different repositories.

One of the way that I can suggest is by uploading the dependencies to the Repository's "Download" page which the other build can download it directly.

This are a few steps you can follow to upload to the "Download" page

  1. Zip the dependencies that you want to share to other repos
  2. Use "Bitbucket Upload file" Pipe to upload the Download page  (Link to the Pipe)
    - pipe: atlassian/bitbucket-upload-file:0.1.4
      variables:
        BITBUCKET_USERNAME: '<string>'
        BITBUCKET_APP_PASSWORD: '<string>'
        FILENAME: '<string>'
        # ACCOUNT: '<string>' # Optional
        # REPOSITORY: '<string>' # Optional
        # DEBUG: '<boolean>' # Optional

Once the files is uploaded to the Download page, the other project that you have can run a simple curl command to download the file then unzip it:

curl "https://${BB_AUTH_STRING}@api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads/<YOUR_FILE_NAME>" --output "<YOUR_FILE_NAME>"

ℹ The value of the variable ${BB_AUTH_STRING} is your username and password (<username>:<password>)

Cheers,
Ronald

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Bitbucket

How do you use the Bitbucket-Jira integration? How does it help your team?

Hey everyone, over the past year, we've added several new features on how you can use Bitbucket and Jira together. We'd love to know how you'll are using the integration and how it's helping your t...

86 views 0 2
Join discussion

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