Walaitki
Walaitki

Reputation: 165

Referencing external private Git repository in CircleCi build

Here is the scenario I am dealing with:

  1. I WANT to/HAVE setup CircleCI build for my project with unit tests etc.
  2. In this project I use another one of my libraries which needs to be installed on the build container in CirleCi, otherwise my tests are failing.

I need to find a way to either:

  1. pull git repository of external reference and install it
  2. Or download it as zip
  3. Or some other way ?

Happy to add more explanation if needed.

Upvotes: 1

Views: 707

Answers (1)

phd
phd

Reputation: 94912

From the section Using Resources External to Your Repository:

  • CircleCI supports git submodule, and has advanced SSH key management to let you access multiple repositories from a single test suite. From your project’s Project Settings > Checkout SSH keys page, you can add a “user key” with one-click, allowing you access code from multiple repositories in your test suite. Git submodules can be easily set up in your circle.yml file (see example 1).
  • CircleCI’s VMs are connected to the internet. You can download dependencies directly while setting up your project, using curl or wget.

(Or just using git clone without submodules.)

Upvotes: 2

Related Questions