継続的インテグレーションのビルド プロセスを設定する上で重要なのは、Bamboo が連携するコード リポジトリを指定することです。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.
使用方法と権限に影響するリンク トリポジトリへの重要な変更
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 create Linked Repositories.
- Users will need the Create Plan global permission in order to create Linked Repositories.
アトラシアンは、長期的には、プランに対して定義されたリポジトリ設定を廃止する予定です。これらの設定は、各プランのリポジトリ設定ページで [Convert to linked repository (リンク リポジトリに変換)] をクリックすることで、リンク リポジトリに変換できます。
ソース コード リポジトリをすべての Bamboo プランにリンク
リンクされたリポジトリは、Bamboo Server で構成されたすべてのプランとジョブでグローバルに利用できます。これを行うと、ソース リポジトリが変更された場合に、複数の場所でソース リポジトリを再構成する必要がなくなります。リンクされたリポジトリへの変更はすべて、そのリポジトリを使用するすべてのプランまたはジョブに適用されます。
You need the 'Create plan' or 'Admin' global permission to configure linked repositories.
- Bamboo ヘッダーの「歯車」アイコンをクリックしてから、リンクされたリポジトリをクリックします。
- [リポジトリを追加] をクリックします。
- 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:
- Bitbucket (for Bitbucket Cloud)
Stash (for Bitbucket Server)
- Git
- GitHub
- Mercurial
- Subversion
- CVS
- 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.
- Navigate to the plan. See Configuring plans for instructions.
- アクション > プランの設定を選択します。
- [リポジトリ] タブをクリックして、プランに追加されたすべてのリポジトリを表示します。
- リスト内のリポジトリ名をクリックして、その構成の詳細を編集します。
- [リポジトリを追加] をクリックして、プランで使用するリポジトリを構成します。
特定のリポジトリ タイプの構成の詳細については、次のいずれかのページを参照してください。- Bitbucket (for Bitbucket Cloud)
Stash (for Bitbucket Server)
- Git
- GitHub
- Mercurial
- Subversion
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.
ジョブのリポジトリを構成
ビルドの後の段階のタスクなど、ジョブ レベルで使用する Bamboo プランの追加のリポジトリを指定できます。
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.