Use Private Meteor Packages on Codeship
Note that we did not discuss how to use & develop your local packages. There are several ways, I suggest to use the
PACKAGE_DIRS environment variable described by David Weldon on his website.
Configure Codeship to Install Private Github Packages
Append the following command to the Codeship setup commands:
Now, we need to give Codeship access to these private repositories. There is a Codeship documentation article describing this process in detail but here are the steps that you have to take for Github:
- Create a new Github account. A so called Machine user.
- Remove the deploy key from your repo under test. Here: https://github.com/YOUR_USERNAME/REPO_UNDER_TEST/settings/keys
- Grab the SSH public key from your codeship projects settings. Somewhere here: https://codeship.com/projects/PROJECT_NUMBER/configure
- Add this SSH public key to your machine user's SSH keys: https://github.com/settings/keys
- Give this machine user access to all your referenced repositories
It should be similar for BitBucket and others.
We make use of Dispatches great Meteor Github Packages (mgp) package:
Then, add the following command to your
Create a file named
git-packages.json in your project root. Add a config for every (private) Meteor Github package that your project depends on:
More information about how to configure your private packages can be found on the projects Github repo.