Git

ソース コード リポジトリへのリンク

このページの内容

このセクションの項目

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

This page describes how to configure Bamboo to use a Git repository.

Bamboo では、次のレベルでリポジトリを指定できます。

  • グローバル - Bamboo のすべてのプランでリポジトリを利用できます。
  • プラン - Bamboo プランのすべてのジョブでリポジトリを利用できます。
  • ジョブ - Bamboo ジョブのすべてのタスクでリポジトリを利用できます。

推奨されるアプローチは、リンクされたソース リポジトリをグローバル レベルで設定することです。「ソース コード リポジトリへのリンク」を参照してください。

You need to have previously defined a Git capability before you can configure a Git source repository – see Defining a new version control capability.

(info) Bamboo には独自の Git 実装が組み込まれていることに注意してください。ただし、シンボリック リンク、サブモジュール、自動ブランチ検出、自動マージを使用するには、ネイティブ Git を使用する必要があります。これらは組み込みの Git ではサポートされていません。

Git は次の場所からダウンロードできます。

 

Git ソース リポジトリを設定する

  1. リンクされたリポジトリ、プラン、またはジョブのポジトリ設定に移動します。「ソース コード リポジトリへのリンク」を参照してください。
  2. Either click Add Repository to add a new repository, or edit an existing repository configuration.
  3. Choose Git from the Source Repository list.
  4. Enter a Name to help identify the repository in Bamboo.
  5. プランの Git ソース リポジトリ用に次の設定を指定できます。
リポジトリ URL

The full path to your Git repository (eg:  https://bitbucket.org/atlassian/bamboo-git-plugin.git )

有効な URL の形式は次のとおりです。

  • git://host.xz[:port]/path/to/repo.git
  • ssh://[user@]host.xz[:port]/path/to/repo.git
  • [user@]host.xz[:port]/path/to/repo.git
  • http[s]://host.xz[:port]/path/to/repo.git
  • /path/to/repo.git
  • file:///path/to/repo.git 
ブランチ   Type the name of the relevant branch (or tag) you want to work on. Leave empty to work on the master branch.
認証タイプ None – choose if you want to access the repository anonymously
Username and password – use shared credentials or type a username and a password

SSH private key  – use shared credentials or upload an SSH key and provide the SSH passphrase

Use shallow clones (shallow clone を使用する)

Bamboo で shallow clone を実行できるようにします (つまり、履歴は指定のリビジョン数に切り捨てられます)。これにより、最初のコード チェックアウトの速度が向上するはずですが、ビルドがリポジトリ全体の履歴に依存している場合は、このオプションを使用しないことをお勧めします。shallow clone は既定で有効になっています。

POM ファイルの場所

(上記で定義した) Git の [Repository URL (リポジトリ URL)] のルートを基準にしたプロジェクトの pom.xml ファイルのパスです。

(Maven 2 プロジェクトをインポートする場合にのみ利用可能) 

Git LFS 
Enables support for Git Large File Storage (LFS), which replaces large files such as audio samples, videos, datasets, and graphics with text pointers inside Git, while storing the file contents on a remote server.
To use this option you must have the following:
  • Git version 1.8.2 or later installed locally in your environment
  • Git LFS 1.2 or later installed.

    Bamboo 5.15 is shipped with different images which also include the Git LFS client.

詳細オプション

サブモジュールを使用するリポジトリにサブモジュールが定義されている場合に、サブモジュールのサポートを有効にするために選択します。エージェントにネイティブの Git 機能が定義されていない場合、サブモジュールのサポートは無効になります。
コマンド タイムアウト これは、ハングした Bitbucket プロセスを停止するのに役立ちます。低速なネットワークでは、Bamboo が Git リポジトリの最初の複製を作成する時間を確保するため、既定のタイムアウトを長くすることを検討してください。
詳細なログ Git コマンドからのより詳細なログを有効にします。Bamboo で Git に関する問題が発生した場合は、このオプションを使用してください。
Enable Quiet Period (待機期間を有効にする)1 つのコミットが検出されてからビルドが開始されるまでの遅延を指定します。これによって、複数のコミットを 1 つのビルドに集約できます。
Include/Exclude Files (ファイルを含める/除外する)

Allows you to specify the files that Bamboo should, or should not, use to detect changes. When you configure the Include option, it means that you want Bamboo to use only the mentioned files for change detection because by default Bamboo checks all the files. The same way,  if you configure the Exclude option, Bamboo will not consider the excluded files for detecting changes.

Enter into File Pattern a regular expression to match the files that Bamboo  includes or excludes. The regex pattern must match the file path in the repository. See sub page for examples.

Exclude Changesets (チェンジセットを除外)Enter a regular expression to match the commit messages for changesets that should not start a build.
Git LFS 
Enables support for Git Large File Storage (LFS), which replaces large files such as audio samples, videos, datasets, and graphics with text pointers inside Git, while storing the file contents on a remote server.
To use this option you must have the following:
  • Git version 1.8.2 or later installed locally in your environment
  • Git LFS 1.2 or later installed.

    Bamboo 5.15 is shipped with Git LFS client image.

    To learn more about Git LFS, see Git LFS tutorials.

Web repository

Web リポジトリ

Web ブラウザでリポジトリを表示できる場合は、リポジトリの種類を選択します。

これによって、関連するファイルへのリンクをビルド結果の [コード変更] セクションに表示できます。

Stash – specify the following details for the repository:

    • Stash URL – the URL of your Stash ( now Bitbucket Server) instance (e.g. ' https://bitbucket.mycompany.com  ').
    • Stash プロジェクト キー - Stash 内のプロジェクトのキー (例:「CONF」)。
    • Repository Name – the name of the repository in Stash (e.g. 'conf-dev').

       Use this option to connect to a Bitbucket Server repository.

See Integrating Bamboo with Bitbucket Server for more information.

Fisheye – specify the URL and other details for the repository:

    • Fisheye URL — the URL of your Fisheye repository (e.g. ' https://atlaseye.atlassian.com/ ').
    • Repository Name — the name of your Fisheye repository (e.g. 'Bamboo'). This is effectively the alias for your repository path.
    • Repository Path — the path for your Fisheye repository (e.g. '/atlassian/bamboo/').

See Integrating Bamboo with Fisheye for more information.

リポジトリのパスを特定する方法

If you have previously run builds with changes from your repository, the easiest way of determining your repository path is to view the code changes and copy the path from the start of the path of one of the changed files, up to (but not including) the appropriate root directory. The root directories for repositories are the ones shown by Fisheye when browsing a repository (e.g. trunk)). For example, if a code change listed /atlassian/bamboo/trunk/bamboo-acceptance-test/pom.xml, the path would be /atlassian/bamboo/.
If you have not previously run builds with changes from your repository, you will need to ask your Fisheye administrator for the repository path indexed by Fisheye.


最終更新日 2018 年 7 月 6 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する

このセクションの項目

Powered by Confluence and Scroll Viewport.