ソース コード リポジトリへのリンク
継続的インテグレーションのビルド プロセスを設定する上で重要なのは、Bamboo が連携するコード リポジトリを指定することです。Bamboo では、次のレベルでリポジトリを指定できます。
- グローバル – リポジトリは Bamboo のすべてのプランで利用できます。
- プラン – リポジトリは Bamboo プランのすべてのジョブで利用できます。
- ジョブ – リポジトリは Bamboo ジョブのすべてのタスクで利用できます。
推奨されるアプローチは、以下で説明しているように、リンクされたソース リポジトリをグローバル レベルで設定することです。
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.
ソース コード リポジトリをすべての Bamboo プランにリンク
リンクされたリポジトリは、Bamboo Server で構成されたすべてのプランとジョブでグローバルに利用できます。これを行うと、ソース リポジトリが変更された場合に、複数の場所でソース リポジトリを再構成する必要がなくなります。リンクされたリポジトリへの変更はすべて、そのリポジトリを使用するすべてのプランまたはジョブに適用されます。
You need the Create plan or Admin global permission to configure linked repositories.
- From the Bamboo header select > Build resources > Linked repositories.
- Select Add repository.
- 利用可能なメニュー オプションからリポジトリ タイプを選択します。特定のリポジトリ タイプの構成の詳細については、次のいずれかのページを参照してください。
- Bitbucket (for Bitbucket Cloud)
Stash (for Bitbucket Server)
- Git
- GitHub (for GitHub and GitHub Enterprise)
- Subversion
- perforce
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!
プランのリポジトリを構成
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. Note that default repository is an essential concept when working with plan branches, refer to Using plan branches for more details.
- プランに移動します。手順については、「プランの構成」を参照してください。
- Select Actions > Configure plan.
- Select the Repositories tab to see all the repositories that have been added to the plan.
- Select a repository name in the list to edit its configuration details.
- Select 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:- Bitbucket (for Bitbucket Cloud)
Stash (for Bitbucket Server)
- Git
- GitHub (for GitHub and GitHub Enterprise)
- Subversion
In the long term, we plan to deprecate the repository configuration defined against a plan. These configurations can be converted to Linked repositories by selecting Convert to linked repository on each plan repository configuration page.
ジョブのリポジトリを構成
ビルドの後の段階のタスクなど、ジョブ レベルで使用する Bamboo プランの追加のリポジトリを指定できます。
ソース コード チェックアウト タスクをジョブに追加して、そのジョブだけの特定のリポジトリを構成します。ソース コード チェックアウト タスクの構成に関する詳細については、「コードのチェックアウト」を参照してください。