Bitbucket is getting a new navigation

We’re rolling out these changes, so the documentation may not match your experience in the Bitbucket Cloud app. Read about the new Bitbucket navigation

Bitbucket Cloud を Jira Data Center と接続する

When your Bitbucket Cloud workspace is connected with Jira Data Center, the members of that workspace sees their branches, commit messages and pull requests right in the context of the Jira work items they're working on. Read more in Integrating with development tools.

Bitbucket Cloud アカウントを Jira Data Center と接続する

Bitbucket Cloud アカウントを Jira Data Center に接続するには、Jira で提供されている DVCS コネクタを使用します。

接続する Jira Data Center と Bitbucket Cloud アカウントの両方で管理者権限を持っている必要があります。 

次の手順を実行してください。

ステップ 1. Bitbucket Cloud アカウント用の OAuth アクセス トークンを作成する

The DVCS Connector requires an OAuth access token, which you create in your Bitbucket Cloud account. You should create the access token in the Bitbucket Cloud account that owns the repositories you want to link. If you are linking repositories for a workspace, you should generate this token using the workspace account. 

次のように OAuth トークンを作成します。

  1. プロファイル アバターから、ワークスペースを選択します。

  2. 上部のナビゲーション バーにある [設定] (歯車アイコン ) を選択します。

  3. [設定] ドロップダウン メニューから [ワークスペース設定] を選択します。

  4. 左側のサイドバーの [アプリと機能] の下にある [OAuth コンシューマー] を選択します。 

  5. コンシューマーを追加します。

  6. 次の詳細を入力します。
    名前: この例では「JIRA DVCS」と入力します。
    説明: このトークンが何のために作成されたのかをリマインドする説明を入れます。
    コールバック URL: OAuth 2 を使用している場合、コールバック URL は必須です。また、[これは非公開コンシューマーです] を有効にしている場合は、コールバック URL を指定する必要があります。

  7. 以下のパーミッションを選択します: 

    • アカウント: 書き込み

    • リポジトリ: 管理者 (リポジトリへの書き込み権限はなし)

    • プル リクエスト: 読み取り

    • Webhook: Read および Write これらは Jira DVCS コネクタで必要な最小権限です。
      権限を追加しても、統合への悪影響はありません。

  8. [保存] を選択します。

  9. Select the name of your new consumer to see the OAuth Key and Secret values.

  10. DVCS をブラウザで開いたまま、次のステップにいってください。

ステップ 2. Jira Data Center で OAuth トークンを追加する

Bitbucket Cloud でキーとシークレットを作成したら、Jira Data Center に移動して、次のようにアカウント、OAuth キー、シークレットを入力します。

  1. 管理者権限を持つユーザーとして Jira Data Center にログインします。

  2. From the Jira Data Center dashboard, sekect the (settings) icon.

  3. [アプリ] を選択します。

  4. 左側の [連携] セクションから [DVCS アカウント] を選択します。

  5. Select Link Bitbucket Cloud or GitHub account.

  6. [ホスト] 値として [Bitbucket Cloud] を選択します。

  7. ワークスペースまたはユーザー アカウント名を入力します。

  8. Bitbucket Cloud アカウントの OAuth キーシークレットの値をダイアログへコピーします。

  9. 必要に応じ、自動リンクと Smart Commits の既定値のチェックをはずすか、無効にします。

  10. [追加] を選択します。

  11. Select Grant access.

接続したアカウントとそのすべてのリポジトリが Jira の [DVCS アカウント] ページに表示されます。初回同期が自動的に開始されます。

DVCS 接続についての注意事項

DVCS コネクタは、キーとシークレットを自動的には信頼しません。アカウントとパスワードの組み合わせを使用して DVCS への接続を許可するよう求められます。許可するアカウントは、キーとシークレットの作成に使用したアカウントでなくてもかまいませんが、リンクするすべてのリポジトリに対する管理アクセス権限を持つアカウントである必要があります。 

DVCS コネクタを使用してアカウントをリンクすると、コネクタは post-commit webhook を Bitbucket Cloud のアカウントで所有しているすべてのリポジトリに追加します。コミットが発生すると、webhook は処理のためにコミット情報を DVCS コネクタに渡します。

Jira 側では、ご利用の Bitbucket Cloud アカウントで所有しているリポジトリが「DVCS アカウント」ページに表示されます。ワークスペースのメンバーが、個人の Bitbucket Cloud アカウントでリポジトリを作成して、その所有者としてワークスペースを割り当てる場合もあります。このようなリポジトリも一覧に表示されます。

アカウントをリンクすると、 Jira は作業項目キーを参照するコミットの検索を自動で開始します。要約には、同期結果とエラー (ある場合) が表示されます。Bitbucket リポジトリから Jira へのコミット データの同期には時間がかかる場合があります。同期が進むと、コミットが関連する作業項目に表示されます。必要に応じて、Jira Software でリポジトリのリンクをいつでも有効化/無効化できます。 

Jira プロジェクトでのコミット情報の表示例

開発者がコミットを作成する場合は、次のように Jira 作業項目キーをコミット メッセージに追加する必要があります。

git commit -m "PROJ-123 add a README file to the project." git push origin <branchname>

Jira uses the work item key to associate the commit with a work item, so the commit can be summarized in the Development panel for the Jira work item. Read more in Integrating with development tools.

必須のプロジェクト権限

Project users must have the 'View Development Tools' permission to see commit information in the Development panel in a Jira work item. A Jira admin can edit a project's permission schema to grant this permission. See Managing Project Permissions.

さらにヘルプが必要ですか?

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