# ビルドとデプロイメント

TalendではプロジェクトアーティファクトをTalend Cloud、アーティファクトリポジトリー(Nexus、Artifactory)、Dockerのいずれかに公開してその実行をスケジュール設定する方法をいくつか提供しているので、ニーズに最も合った方法を選ぶことができます。

* 推奨: 外部の継続的インテグレーションツールをお使いください。CIドメインでは、多様なCIサーバー技術を利用できます。Talend CIは明示的には特定のプラットフォームに依存しておらず、Apache Maven 3.xをサポートする任意のプラットフォームで実行可能です。選択されたCIサーバー技術は、Talend CIとMavenとの連携には影響しません。ただし、JenkinsとAzure DevOps Pipelineを使用したCI実装用に特別に設計された以下のセクションに従うことで、時間を節約できます。

  * Jenkinsを使ったCI/CDビルドの例は、[Jenkinsを使った継続的インテグレーションとデプロイメント](https://help.qlik.com/talend/ja-JP/software-dev-lifecycle-best-practices-guide/8.0/ci-jenkins)をご覧ください。
  * Azure DevOpsを使ったCI/CDビルドの例は、[Azure DevOpsを使った継続的インテグレーションとデプロイメント](https://help.qlik.com/talend/ja-JP/software-dev-lifecycle-best-practices-guide/8.0/ci-azure)をご覧ください。
  * 他のCIサーバーに関する情報は、Qlik Learningにアクセスし、[AWS CodeBuild](https://learning.qlik.com/student/activity/1589429-implementing-continuous-integration-with-aws-codebuild)、[Bamboo](https://learning.qlik.com/student/activity/1661820-implementing-continuous-integration-with-bamboo)、[BitBucket](https://learning.qlik.com/student/activity/1666344-implementing-continuous-integration-with-bitbucket)、[Concourse CI](https://learning.qlik.com/student/activity/1874806-implementing-continuous-integration-with-concourse-ci)、[GitHub Actions](https://learning.qlik.com/student/activity/1593211-implementing-continuous-integration-with-github-actions)、[GitLab Runner](https://learning.qlik.com/student/activity/1564006-implementing-continuous-integration-with-gitlab-ci-runner)、[TeamCity](https://learning.qlik.com/student/activity/1839260-implementing-continuous-integration-with-teamcity)に関する実装ガイドをお読みください。

* 代替手段:Talend Studioの[Publish] (公開)オプション、[Publishto Cloud] (クラウドに公開)オプション、またはTalend CommandLineを使います。詳細は、[Cloudに公開に公開](https://help.qlik.com/talend/r/ja-JP/8.0/studio-user-guide/publish-jobs)をご覧ください。

* ESBユースケースESBアーティファクト(データサービスおよびルートマイクロサービス)を使ったDockerビルドの例は、[データサービスおよびルートマイクロサービスでのDockerイメージのビルド](https://help.qlik.com/talend/ja-JP/software-dev-lifecycle-best-practices-guide/8.0/building-docker-images-for-data-services-and-routes-microservices)をご覧ください。

継続的インテグレーション環境では、コミットごとにテストを実施することが共通のプラクティスです。

以下のシナリオでは、Talend CommandLineとTalendのMavenプラグインを使ってテストの実行を自動化し、ソースを生成する2つの手法を紹介します。また、ビルドパイプラインを使ってプロジェクトアーティファクトの実行をすべて自動化し、アーティファクトリポジトリー、Talend Cloud、Dockerコンテナーに公開するCIサーバー(AzureおよびJenkins)についても紹介します。

自分の継続的インテグレーションサーバーを使ってアーティファクトの実行と公開をスケジュールする場合、Talendでは、Talend CI Mavenプラグインを提供することでその操作が可能になります。

* Talend CI Builderは、Talendが提供しているMavenのプラグインで、Talendのアプリケーションを使用してTalend CommandLineのジョブソースをJavaクラスに変換します。これにより、テストを自社のJavaファクトリーで実行できます。Talend CI Builderは[公式のTalendリポジトリー](https://talend-update.talend.com/nexus/content/groups/studio-libraries/org/talend/ci/builder-maven-plugin/)で利用可能となっており、ビルド中に自動的にダウンロードおよびインストールされ、プロジェクトアーティファクトを生成して実行します。

* Talend Cloud PublisherはMavenのプラグインで、作成したジョブをTalend StudioからTalend Cloudに直接公開できます。**-Pcloud-publisher**プロファイルパラメーターをお使いのCIビルドに追加すれば有効化されます。このプラグインは、[Talend CIゼロインストールワークフロー](https://help.qlik.com/talend/ja-JP/software-dev-lifecycle-best-practices-guide/8.0/talend-ci-zero-install)で自動的に利用可能となります。

Talendが提供するTalend Studioマンスリーアップデートをインストールすると、Talend CI Builderがアップグレードされることがあります。Talend CI Builderのバージョンは、CIコマンドやパイプラインスクリプトのTalend Studioのバージョンと互換性のあるものを使用するようにしてください。使用するTalend CI Builderの正確なバージョンを知るためは、使用しているTalend Studioマンスリーアップデートに対応する変更ログをご覧ください。Talend Studioの各マンスリーアップデートの変更ログに関する詳細は、[Talendリリースノート](https://help.qlik.com/talend/r/ja-JP/8.0/release-notes)をご覧ください。

Talend CI Builder の使用中にorg.talend.ci:builder-maven-plugin:jar:8.x.xアーティファクトがダウンロードされていないという例外が発生しており、

* バージョン7.3.10以降、または8.0.4以降を使用している場合は、maven\_settings.xmlファイルが公式のプラグインリポジトリーをポイントしていることを確認してください:
  ```
  <pluginRepository>
  <id>central-talend</id>
  <name>central-talend</name>
  <url>https://talend-update.talend.com/nexus/content/groups/studio-libraries/</url>
  <layout>default</layout>
  </pluginRepository>
  ```
* Nexusを使用している場合は、Talend Studioのプロジェクトにログインすることで新しいバージョンを自動的にデプロイできます。
* Nexusを使用していない場合は、ターゲットのMavenリポジトリーに新しいバージョンを手動でインストールできます。

### このセクション内

* [前提条件](https://help.qlik.com/talend/ja-JP/software-dev-lifecycle-best-practices-guide/8.0/before-scheduling-execution-of-your-artifacts)
* [TalendのカスタムMavenビルドのオプション](https://help.qlik.com/talend/ja-JP/software-dev-lifecycle-best-practices-guide/8.0/ci-mvn-options)
* [Mavenコマンドを使った手動による継続的インテグレーションとデプロイメントの例](https://help.qlik.com/talend/ja-JP/software-dev-lifecycle-best-practices-guide/8.0/ci-manual)
* [Jenkinsを使った継続的インテグレーションとデプロイメント](https://help.qlik.com/talend/ja-JP/software-dev-lifecycle-best-practices-guide/8.0/ci-jenkins?id=36)
* [Azure DevOpsを使った継続的インテグレーションとデプロイメント](https://help.qlik.com/talend/ja-JP/software-dev-lifecycle-best-practices-guide/8.0/ci-azure)
* [データサービスおよびルートマイクロサービスでのDockerイメージのビルド](https://help.qlik.com/talend/ja-JP/software-dev-lifecycle-best-practices-guide/8.0/building-docker-images-for-data-services-and-routes-microservices)