Info |
---|
Before reading this page, it is highly recommended you read repositories concept page. |
...
Table of Contents |
---|
What is a Repository?
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. Once a repository has linked a VCS to a configuration, all builds created by that configuration can then access the VCS and use it's files within the build process. Before a build is executed, Continua will check your VCS for any new changes, get the latest version and distribute the latest version to the Continua Agents that will run the build.
By using triggers, Continua can automatically trigger a build every time a change is commited committed to your VCS.
Additional Repository Information
Children Display |
---|
Repository Types
Continua CI uses multiple repository types when dealing with various VCSs. Each VCS that is supported by Continua has a matching repository type. For example, if you want to link a mercurial repository to Continua then you would have to create a mercurial repository. Each repository type required requires different information to connect to their respective VCS. For more information on a specific type of repository, see the Repository Types section.
...
Depending on the repository scope, repositories can befound be found in different areas of Continua CI:
...
The repositories administration page can be found in the Administration section, under Continous Integration under Continuous Integration (CI Server). On this page you can edit and delete every repository that exists in Continua CI, regardless of the repository scope.
...
Configuration Wizard Repositories Section
The Configuration Wizard repositories page can be found by editing a specific configuration and navigating to the repository section. This page allows you to create, edit and delete project, global and configuration repositories. You can also define default branches and branch mappings via the Mappings link for branch-aware repositories.
Through this page you can also assign project and global repositories to a specific configuration. Repositories can be assigned by ticking the Repository checkbox in either the Global Repositories table or Project Repositories table (In the figure above, global_source GlobalSource has been assigned to this configuration while binaries Binaries has not). Note that when you assign a repository to a configuration that you must click either Complete Wizard or Save & Continue to save your changes.
Creating and Editing Repositories
Repositories can be created and edited via the pages listed above.
Name
The name of this repository. Note that the repository name cannot contain spaces
...
Issue Connectors monitor your commit messages and links any bug fixes to your issue tracking system. Selecting an issue connector on the repository means that continua Continua will monitor all commit messages from this repository for issue ids and then attempt to link these issues to your issue tracking system.
...
The polling frequency can be set to Never (Manual) which means Continua will never automatically check for changes. See the Manually Polling for Changes section below for more details on how to call manual polls.
...
Specifies the type of repository we are creating or editing, eg. Mercurial or Git. Once a repository type has been selected, additional repository type specific properties will be added to the dialog. These properties can be accessed through the tabs located at the top of the dialog.
Checkout files to workspace
Clear this if you are only using this repository to trigger builds and do not want to copy any files to the workspace.
Enabled
Enable or disable a repository. View the Disabled Repositories section below for more information on disabled repositories.
Branches
For branch-aware repositories the Branches tab allows you to refine how branches are handled by Continua. This setting affects which part of the given repository Continua looks for changes (useful in large repositories).
Options here include, a single branch, all branches, or branches with a specific pattern.
All Branches (the default for branch-aware repositories)
Consider all branches in the repository.
Single Branch
Consider the given branch only. The branch name must match exactly.
By Branch Pattern
Consider only branches which meet a specific pattern (using the supplied regex).
Maximum active branch age
You can also specify a maximum branch age. This allows you to exclude older branches from the selection list when starting a new build or defining a trigger.
Tags
For Tag-aware Repositories (Git, Mercurial and Subversion), the Tags tab sets how Continua handles changeset tags.
Tag changes
The options here include: 'Ignore', 'Detect', 'Detect and list as new Changeset'
Detect and list as new changeset (the Default for tag aware repositories)
Detect all tags for the given repository and treat them as a new changeset.
Ignore Tags
Do not consider Tags as changes.
Detect Branches
Detect tags and show tags next to changeset.
Commit / Push Username
The username to use when committing, or pushing for Git, tags to the repository (tags are committed via a Build Event Handler)
Commit / Push Password
The password to use when committing, or pushing for Git, tags to the repository (tags are committed via a Build Event Handler)
Push Repository URL (Git repositories)
The URL for pushing tags to the remote Git repository. If this is left blank the Repository URL will be used.
Tags Path (Subversion repositories)
The path the root directory for your tags
Filtering
Path Filtering
Specify patterns to match folders or files that you want to include and/or exclude from the repository cache. Type each pattern on a new line using the ANT pattern format. You can also use regular expressions prefixed with re:
Changeset Exclude Patterns
...
Exclude patterns allow you to ignore incoming changesets for a repository based on the files that were changed. Changesets will be ignored if every updated file in the changeset matches your exclude patterns. For example, you could set your exclude patterns up so that if any old files (files that end in .old) were changed then Continua will ignore that changeset. Note that if another file was also modified in that changeset that does not match the exclude pattern, then the changeset will still be added to Continua.
...
Exclude patterns use Ant Pattern formatting.
Downtime
Setting downtime periods on your repository tells Continua CI that your repository should not be contacted during these periods. This allows you to take repositories offline without causing Continua to throw errors regarding contacting your repository.
...
All times are in 24 hour format and are localised to Continua's server time.
...
Configuration Repository Branch Mappings
Errored Repositories
Disabled Repositories
Manually Polling for Changes
Continua can be instructed to manually poll your repository by calling the Manual Poll Url that is displayed under the Polling Frequency property
Configuration Repositories
The main function of the Configuration Wizard's Repository page is to create and assign repositories to the Configuration. For a repository to be usable by a Configuration it first must be assign to it. Global and Project Repositories can be assigned to a Configuration by selecting the checkbox next to the Repositories name. The following picture shows all the repositories in Continua CI that this Configuration can access. Both the Global Repository MyGlobalRepo and the project level repository myProjectRepo are assigned to the Configuration we're editing since its check box is ticked.
Note: The two Configuration specific repositories MyConfigurationRepo and hg do not have a check box next to its name. This is because Repositories with Configuration scope are always assigned to the Configuration.
Creating Repositories in the Configuration Wizard
A repository can be created both in the Project Wizard and the Configuration Wizard. The Project Wizard restricts you to creating and modifying repositories at the Global and Project level scope. In the Configuration Wizard, you have a third option when creating a Repository, and that is to create one within the Configuration scope. A repository created with Configuration scope can only be accessed by that Configuration and is automatically assigned to the Configuration.
Project Repositories
The Repository step of the Project Wizard allows you to create repositories that can be used by any Configuration in Continua (known as global repositories) and repositories specific to the current project (known as project repositories) which can only be used by Configurations in the project.
The repositories are displayed grouped by their scope type, Global and Project.
Each section has its own
Makeitblue |
---|
[Create] |
Makeitblue |
---|
[Create] |
Issue Tracker
If you've setup an Issue Connector, this is the place to assign it to the repository. The Issue tracker is optional and can be added at any time. See Issue Connectors for more information.
Polling Frequency
The frequency at which Continua will check for changes in the repository.
Type
The type of version control system of your repository. See Repository Types for a full list of supported repositories. When you select a repository type, additional tabs will be displayed containing repository specific settings.
Validation
Once a Type has been selected and the appropriate fields filled in, you can click the Validate button to check if the settings are correct.
Modify a Repository
After creating a repository you will see it listed on the wizard's repository page.
Branch mappings can be accessed from the Configuration Wizard Repositories page by clicking on the Mapping link for each branch-aware repository.
Default Branch
This is the branch that is built for this repository when you run a build for the current configuration using the Quick Start Build button. It is also the default branch listed for this repository in the Queue Build dialog. This will override the default branch for the repository.
Triggers will also use the configuration default branch unless the branch is overridden in the trigger settings.
Branch Mappings
The branch mappings are mainly used to define which branches are built for a Repository Trigger. Branches are specified for each repository according to the triggering branch. These will override the default configuration branches for the repository.
Branch mappings can also be loaded into the queue build dialog clicking on a button next to the triggering repository.
Resetting a Repository
Resetting a repository forces Continua to delete the local repository cache for the specified repository and pull the latest changesets from your repository. When a repository is reset, Continua will get the latest changeset for each branch in that repository.
If your repository is in an errored state then resetting it may fix the issue.
Repositories can be reset through the Administration Repositories page.
Errored Repositories
A repository will be in an errored state if there are any issues when Continua attempts to get the latest changesets. If a repository is in an errored state then you can try to resolve the issue through the Administration Repositories page. Resolving a repository will reinitialise it and force to get the latest changesets. If you resolve a repository and it is still in an errored state, then you may need to reset the repository.
If resolving and resetting does not fix your repository then you should check your repository settings.
Disabled Repositories
By disabling a repository you are telling Continua to stop interacting with it. If a repository is disabled then Continua will not check for new changesets and any references to that repository will fail during the build process. For example, if you reference a disabled repository's path by using the following syntax $Source.myRepo.Path$, then at build time this will not be resolved, resulting in a failed build. As far as the build engine is concerned, the repository doesn't exist which means it cannot get the path value from the repository.
Manually Polling for Changes
Continua can be instructed to manually poll your repository by calling the Manual Poll Url that is displayed under the Polling Frequency property. Note that the Manual Poll Url property will only be displayed if Polling Frequency is set to Never (Manual).
Each repository will list its name, repository type and issue tracker. In addition, it will show which configurations are using the repository and if you have the right permission, the links to edit, delete and change the scope of a repository. Editing a repository will popup a dialog exactly like the one used to create it. Changing a repositories scope is as simple as clicking the link. Note however, you will not be able to change the scope of a repository until it's safe to do so. For example, if you have a global repository that is used by configurations in ProjectA and ProjectB then you can't change the scope of that repository to exist only in ProjectA since configurations in ProjectB would then lose access to it.