Every Mortar Project is associated with a private git repository in github. This repository is used to synchronize code between your computer and the Mortar platform when you run a job.
However, with Embedded Mortar Projects, you can use your own source control—git, svn, or any other, and can embed a Mortar Project anywhere inside your source tree. Mortar will still create a private git repository, and will automatically manage deployment to it when you want to run a job.
First, ensure that you have installed the Mortar Development Framework, and are logged in to the github user associated with your Mortar account.
Next, checkout your internal source control repository, and create a new Embedded Mortar Project:
# cd to parent directory above where you # want new Embedded Mortar Project to live cd /parent/path/to/embed/mortar/project # generate and register a new Embedded Mortar Project mortar projects:create name_of_my_embedded_project --embedded
Finally, be sure to check the Embedded Mortar Project into your source control system.
All of the regular
mortar commands will work exactly the same for Embedded Mortar Projects. Any commands that need to deploy code to the Mortar Platform (e.g.
mortar jobs:run) will automatically sync the code via the private, backing github repository.
Embedded Mortar Projects have a whitelist of directories and files to synchronize to the Mortar Platform. The whitelist is stored in the
project.manifest file, and by default contains the directories:
You can change the values in this file to control which files are synced to the Mortar Platform.