ソース コード リポジトリへのリンク
A key part of setting up your continuous integration build process is to specify the code repositories that Bamboo will work with. You can specify repositories at the following levels in Bamboo:
- global – repositories are available to all plans in Bamboo.
- plan – repositories are available to all jobs in the Bamboo plan.
- job – repositories are available to all tasks in the Bamboo job.
The recommended approach is to set up linked source repositories at the global level, described below.
Important changes to Linked Repositories that affect usage and permissions
Linked repositories are now the preferred way to define and share repository configuration between plans in Bamboo. As a result, we've made two changes that you should be aware of:
- When users create plans, they are only given the option to select from Linked Repositories. This requires that users have the Create plan global permission.
- Users will need the Create Repository global permission in order to create Linked Repositories. Note that this permission alone does not permit a user to create or edit a plan.
In the long term, Atlassian plans to deprecate the repository configuration defined against the plan. These configurations can be converted to Linked repositories by clicking Convert to linked repository in each plan's repository configuration page.
Link a source code repository for all Bamboo plans
Linked repositories are available globally to all plans and jobs configured on the Bamboo server. Doing this can save you from having to reconfigure the source repositories in multiple places if these ever change - any changes to a linked repository are applied to every plan or job that uses that repository.
You need the 'Create plan' or 'Admin' global permission to configure linked repositories.
- Click the 'cog' icon in the Bamboo header and then Linked repositories.
- Click Add repository.
- Select your repository type from the available menu options. For configuration details for a particular repository type, please refer to one of the following pages:
If you need to use an unsupported type of repository, a number of third-party Source Repository plugin modules are available (e.g. the ClearCase plugin). You can also write a Source Repository Module plugin to enable Bamboo to connect to your repository.
Note that shared source repositories are no longer the preferred way to share repository configuration between plans. Use linked repositories instead!
Configure a repository for a plan
When you create a new plan, the source repository you specify becomes the default. It is used by the plan's 'Default Job' and can be used by other jobs added to this plan.
- Navigate to the plan. See Configuring plans for instructions.
- Choose Actions > Configure plan.
- Click the Repositories tab to see all the repositories that have been added to the plan.
- Click a repository name in the list to edit its configuration details.
- Click Add repository to configure a repository to be used by the plan.
For configuration details for a particular repository type, please refer to one of the following pages:
Please note that In the long term, Atlassian plans to deprecate the repository configuration defined against a plan. These configurations can be converted to linked repositories by clicking Convert to linked repository in each plan's repository configuration page.
Configure a repository for a job
You can specify additional repositories for a Bamboo plan to work with at the job level, perhaps for tasks in later stages of the build.
You add the Source Code Checkout task to a job to configure a particular repository for just that job. See Checking out code for details about configuring the Source Code Checkout task.