Repositories
A repository in Continua CI is a reference to an external Version Control System (VCS) that provides a way for Continua CI to interact with that VCS. Adding a repository and assigning it to a Configuration allows the user to make use of the VCS's content in Continua CI. Some examples of using a repository in Continua CI include:
- Automatically trigger a build whenever a check-in occurs in a tracked VCS.
- Referencing components of the VCS in build actions.
- Monitor and record changes in the repository. These include changesets that triggered a build or changesets that have been added since the previous build was run.
- Show changesets that were committed by the current user. For a user to correctly view their own changes, they will first need to configure their Repository User Mappings.
- Link a repository to an Issue Connector. This allows you to automatically link repository check-in comments to an issue in your issue tracking system.
Repository Caches
Building the right code base
The cache isn't just a bunch of files - it is versioned. This makes it easy for us to get the right version of the source to build. For example, lets say you have a Repository Trigger with a quiet period of 1 minute, which means that the build will wait 1 minute after its triggered to see if any other changes come in. Given the following steps:
- A new commit (Change1) is detected, which queues up a new build.
- Just after the quiet period has ended, (and the build is just starting) a new change (Change2) is detected in your repository, which is automatically sync'd to all of the agents.
- Your build starts running on an agent
Change2 is in the agent's cache - but we don't want to build it. We want to build the code that triggered the build. So, we get the version of the cache that contains the most recent changeset associated with the build. In this case, that will be the changeset that triggered the build (Change1). Change2 will have triggered its own build, which will build the version of the source associated with it.
This also allows us to run stages on different agents. For example, your Build stage might run on Agent1 and your Installer stage on Agent2. When the Installer stage gets to Agent2, it gets the same version of the cache that was used for the Build stage. Without this versioned cache, we would need to run every stage on the same Agent to ensure that the correct source was used.
Repository Architecture
The diagram below demonstrates the architecture used by Continua CI.