We're updating our terminology in Jira

'Issue' is changing to 'work item'. You might notice some inconsistencies while this big change takes place.

Azure DevOps を Jira に連携する

Connecting your Azure DevOps account to Jira allows your team to track their work in Jira as it ships through the deployment and development pipelines. You’ll get deployment, build, and development information in your team’s Jira work items, on your Jira board, on the deployments timeline, in the development dialog, and in the Releases feature. Read more about integrating deployments with Jira

Azure DevOps for Jira を接続するには、以下が必要です。

  • Jira サイト管理者の権限。

  • [アクセス レベル] を [基本 ] に設定した Azure DevOps 組織へのアクセス権。

  • Jira に接続する Azure DevOps プロジェクトの管理者権限

Azure DevOps アカウントを Jira に接続する

Azure DevOps for Jira (公式) Marketplace アプリをインストールする

  1. From your Jira project, go to Apps, then Explore more apps in the sidebar.

  2. Azure DevOps for Jira を検索します。タイトルに「Official」が付いているバージョンを選択します。

  3. [アプリを入手] > [今すぐ入手] の順に選択します。

  4. アプリをインストールしたら、「今すぐ設定」を選択します。その後、Azure DevOps アカウントと組織を接続するように求められます。

Azure DevOps アカウントと組織を接続する

Azure DevOps アカウントを接続するには、Microsoft アカウントにサインインして、要求される権限を受け入れる必要があります。

  1. 設定画面で、[続行] を選択します。

  2. 新しいタブが開き、Microsoft のサインイン ページが表示されます。資格情報を入力して、Jira に接続したい Azure DevOps アカウントにサインインします。

  3. 次に、Microsoft は Jira にデータを送信する許可を求めます。[承認する] を選択します。

Azure DevOps アカウントが接続されると、Jira に接続できる組織のリストが表示されます。リンクしたいすべての組織で [接続] を選択します。

お使いの Microsoft アカウントに複数の Azure DevOps テナントへのアクセス権があり、間違ったテナントを使用して接続した場合に別の Azure DevOps テナントに切り替える方法は次のとおりです

Azure DevOps で OAuth を有効にする

Jira にデータを送信する前に、Azure DevOps 組織で OAuth を有効にする必要があります。OAuth がまだ有効になっていない組織に接続すると、OAuth を有効にする必要があるというメッセージが Jira に表示されます。

  1. [Go to Azure DevOps (Azure DevOps に移動)] を選択します。

  2. Azure DevOps 組織の設定で、[セキュリティ]、[ポリシー] の順に移動します。

  3. [Application connection policies (アプリケーション接続ポリシー)] で、トグルを使用して、[Third-party application access via OAuth (OAuth によるサードパーティ アプリケーション アクセス)] および [SSH authentication (SSH 認証)] をオンにします。

Azure DevOps で CI/CD パイプラインをセットアップする

Azure DevOps for Jira アプリが認識するデプロイ イベントを Azure DevOps でトリガーするには、次の方法があります。

  • デプロイ ジョブ

  • クラシック リリース パイプライン

デプロイ ジョブを使用してデプロイ イベントをトリガーする

デプロイが YAML パイプラインの一部である場合は、デプロイ ジョブを使用してデプロイ イベントをトリガーできます。Azure DevOps for Jira アプリによって、パイプラインを介して実行されるデプロイ ジョブごとにデプロイ イベントが作成されます。アプリでは、テストの実行やモジュールのインストールなどの他のジョブをデプロイ イベントとは見なしません。

You must have each deployment job in a separate stage in the pipeline. The environment name in the job will be mapped to the corresponding environment name in the deployment information in your Jira work items, on the board, and on the deployment timeline.

こちらはデプロイ ジョブがあるパイプラインのステージの例です。

- stage: 'development' displayName: 'Dev Deployment' jobs: - deployment: Deploy pool: vmImage: 'ubuntu-latest' environment: dev strategy: runOnce: deploy: steps: - download: current artifact: www

この例では、パイプラインには dev 環境へのデプロイ ジョブがあるステージが含まれています。こちらは Jira で環境名 dev のデプロイにマップされます。

クラシック リリース パイプラインを使ってデプロイ イベントをトリガーする

Azure DevOps のクラシック リリース パイプラインを使用してデプロイ イベントをトリガーできます。

この方法を使用するには、トリガー アーティファクトを追加するときに [Source type (ソース タイプ)] として [ビルド] を選択します。

Azure DevOps リリース パイプラインのアーティファクト設定

Each deployment should have its stage. A stage name will be mapped to the corresponding environment name in the deployment information in your Jira work items, on the board, and on the deployment timeline.

Azure DevOps のリリース パイプライン設定

Deployment events include the name of the environment to which your app was deployed. To show the environment details in your Jira work items, Jira needs to know whether the environment is a development, testing, staging, or production environment. Based on the environment name, Jira tries to guess the environment to map your deployment event. For example, a deployment to an environment named dev would be considered a development environment.

他の環境名 (英語以外の環境名など) を使用すると、Jira ではこれらが未定義の環境として表示されることがあります。これを解決するには、.jira/config.yml という名前で次の内容を含むファイルをリポジトリのメイン ブランチに追加して、カスタム環境を指定できます。

deployments: environmentMapping: development: - "dev*" - "Entwicklung" - "desenvolvimento" - "дев" testing: - "testes" - "Test" - "TST-*" - "тест" staging: - "Pre-Prod" - "STG-*" - "staging" production: - "Produktion" - "produção" - "продакшн" - "PROD-*"

この例では、「STG-2」という名前の環境へのデプロイは Jirastaging 環境へのデプロイとしてマップされ、「Produktion」という名前の環境へのデプロイは Jiraproduction 環境へのデプロイとしてマップされます。

Jira では、developmenttestingstagingproduction の 4 つの有効な環境に最大 10 個の glob パターンを指定できます。

To link your team’s development activity to Jira, you must include Jira work item keys in commit messages, branch names, and pull requests. Once a deployment has run on a linked branch, commit, or pull request, you’ll see deployment information in your Jira work items, on the board, and on the deployment timeline. Read more about referencing work items in your development work

アプリでは、パイプラインのリポジトリ内に直接追加されたキーのみがリンクされます。他のリポジトリのキーは認識されません。

To link to branches, commits, and pull requests made in Azure Repos, your team must include Jira work item keys in their development actions.

  1. Find the key for the Jira work item you want to link to, for example “JRA-123”. You can find the key in several places in Jira:

    1. On the board, work item keys appear at the bottom of a card.

    2. On the details, work item keys appear in the navigation at the top of the page.

  2. Check out a new branch in your repo, using the work item key in the branch name. For example, git checkout -b JRA-123-<branch-name>.

  3. When committing changes to your branch, use the work item key in your commit message to link those commits to the development panel in your Jira work item. For example, git commit -m "JRA-123 <summary of commit>".

  4. When you create a pull request, use the work item key in the pull request title or description.

After you push your branch, you’ll see development information in your Jira work item. Read more about referencing work items in your development work

12 か月間非アクティブ期間が経過したら、Azure DevOps で OAuth を再度有効化する

データ同期に必要な OAuth トークンは、その期間内に Azure DevOps から Jira にデータが同期されなかった場合、12 か月ごとに期限切れになります。トークンの有効期限が切れると、Azure DevOps データを Jira と同期できなくなります。

新しい OAuth 更新トークンを取得することで、データ同期を再開できます。

新しい OAuth リフレッシュ トークンを取得するには、次の手順に従います。

  1. [アプリ] > [アプリを管理] の順に選択して、Azure DevOps for Jira の設定ページに移動します。

  2. In your sidebar, under Azure DevOps for Jira, select Configure to log in.

ログインすると、新しい OAuth トークンが自動的に生成され、Azure DevOps と Jira の間のデータ同期が復元されます。

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

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