Hello,
I am working from my company's bitbucket account so I am trying to download the repo on which the required jar files are stored (I want to do this via ssh keys). I am working on creating the yaml file for bitbucket pipelines (for the main project repo) and I could not find a way to incorporate these jar files into my main repo as well as install dependencies - java 1.8 and sbt 1.6.2. I've seen a way to download the repo using a shell script and use maven... but is that necessary as there is no maven needed for this project? Please let me know which approach is best supported by Bitbucket to download jar files from external repos into bitbucket pipelines.
Hey Hareem,
Welcome to the Bitbucket Cloud Community! :)
I believe the easiest and best way to execute files from another repository using SSH is to clone the external repository in pipelines and then execute the files once it has been cloned.
To do this, you will need to follow these steps to give the main repository read access to the target repository:
script:
- git clone git@bitbucket.org:workspaceID/reposlug.git
- cd ./reposlug
- java -jar script.jar
There is an article here that explains this in-depth with screenshots:
https://bitbucket.org/blog/cloning-another-bitbucket-repository-in-bitbucket-pipelines
Hope this helps.
Cheers!
- Ben (Bitbucket Cloud Support)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.