Mavenオプションを定義してプロジェクトをビルド - 8.0

Talendソフトウェア開発ライフサイクル - ベストプラクティスガイド

Version
8.0
Language
日本語
Product
Talend Big Data
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Module
Talend Administration Center
Talend Artifact Repository
Talend CommandLine
Talend JobServer
Talend Studio
Content
ジョブデザインと開発
デプロイメント
管理と監視

Mavenのビルドコマンドはデプロイメントのニーズに適合させることができます。コマンドの例は次のとおりです。

  • CICDプロジェクトのアーティファクトを.jarファイルか.zipファイルとしてビルド、テスト、パッケージ化し、Nexusスナップショットリポジトリーにデプロイメントする場合:
    options: '-f <ProjectName>/poms/pom.xml 
    -s <PathToDirectory>/maven_settings.xml 
    -Dlicense.path=<PathToDirectory>/license 
    -Dtalend.studio.p2.base=<P2BaseURL> 
    -Dtalend.studio.p2.update=<P2UpdateURL> 
    -DaltDeploymentRepository=snapshots::default::http://XXX:8081/repository/snapshots/ 
    -fae 
    -e'
    goals: 'deploy'
    • Groovyスクリプトの例:

      options: '''-f CICD/poms/pom.xml 
      -s /home/talend/CI_dir/maven_settings.xml  
      -Dlicense.path=/home/talend/talend_studio/license 
      -Dtalend.studio.p2.base=https://update.talend.com/Studio/8/base
      -Dtalend.studio.p2.update=https://update.talend.com/Studio/8/updates/R2023-02
      -DaltDeploymentRepository=snapshots::default::http://nexus:8081/repository/snapshots/ 
      -fae 
      -e'''
      goals: 'deploy'

      サポートされているマルチライン文字列の形式については、Groovy構文のドキュメンテーションをお読みください。

    • Yamlスクリプトの例:

      options: '-f CICD/poms/pom.xml 
      -s /home/talend/CI_dir/maven_settings.xml 
      -Dlicense.path=/home/talend/talend_studio/license 
      -Dtalend.studio.p2.base=https://update.talend.com/Studio/8/base
      -Dtalend.studio.p2.update=https://update.talend.com/Studio/8/updates/R2023-02
      -DaltDeploymentRepository=snapshots::default::http://nexus:8081/repository/snapshots/ 
      -fae 
      -e'
      goals: 'deploy'

      サポートされているマルチライン文字列の形式については、YAML構文のドキュメンテーションをお読みください。

    カスタムコンポーネントを使用するジョブの例(カスタムコンポーネントが保存されているアーティファクトリポジトリーをポイントする追加のパラメーターが必要です)。

    • Groovyの例:

      options: '''-f CICD/poms/pom.xml 
      -s /home/talend/CI_dir/maven_settings.xml 
      -pl jobs/process/sample_0.1 
      -am  
      -Dcomponents.nexus.user=username 
      -Dcomponents.nexus.password=password 
      -Dcomponents.nexus.url=http://localhost:8081/ 
      -Dcomponents.nexus.repository=talend-custom-libs-release 
      -Dcomponents.nexus.repository.snapshot=talend-custom-libs-snapshot
      -Dlicense.path=/home/talend/talend_studio/license 
      -Dtalend.studio.p2.base=https://update.talend.com/Studio/8/base
      -Dtalend.studio.p2.update=https://update.talend.com/Studio/8/updates/R2023-02
      -DaltDeploymentRepository=snapshots::default::http://nexus:8081/repository/snapshots/ 
      -fae 
      -e'''
      goals: 'deploy'

      サポートされているマルチライン文字列の形式については、Groovy構文のドキュメンテーションをお読みください。

    • YAMLの例:

      options: '-f CICD/poms/pom.xml 
      -s /home/talend/CI_dir/maven_settings.xml 
      -pl jobs/process/sample_0.1 
      -am  
      -Dcomponents.nexus.user=username 
      -Dcomponents.nexus.password=password 
      -Dcomponents.nexus.url=http://localhost:8081/ 
      -Dcomponents.nexus.repository=talend-custom-libs-release 
      -Dcomponents.nexus.repository.snapshot=talend-custom-libs-snapshot
      -Dlicense.path=/home/talend/talend_studio/license 
      -Dtalend.studio.p2.base=https://update.talend.com/Studio/8/base
      -Dtalend.studio.p2.update=https://update.talend.com/Studio/8/updates/R2023-02
      -DaltDeploymentRepository=snapshots::default::http://nexus:8081/repository/snapshots/ 
      -fae 
      -e'
      goals: 'deploy'

      サポートされているマルチライン文字列の形式については、YAML構文のドキュメンテーションをお読みください。

    コンテキストグループを使用するジョブの例:
    • Groovyの例:

      options: '''-f CICD/poms/pom.xml 
      -s /home/talend/CI_dir/maven_settings.xml 
      -pl jobs/process/parent_0.1 
      -am  
      -Dlicense.path=/home/talend/talend_studio/license
      -Dtalend.studio.p2.base=https://update.talend.com/Studio/8/base
      -Dtalend.studio.p2.update=https://update.talend.com/Studio/8/updates/R2023-02
      -Dtalend.job.context=dev 
      -Dtalend.job.applyContextToChildren=true 
      -fae 
      -e'''
      goals: 'deploy'

      サポートされているマルチライン文字列の形式については、Groovy構文のドキュメンテーションをお読みください。

    • YAMLの例:

      options: '-f CICD/poms/pom.xml 
      -s /home/talend/CI_dir/maven_settings.xml 
      -pl jobs/process/parent_0.1 
      -am  
      -Dlicense.path=/home/talend/talend_studio/license
      -Dtalend.studio.p2.base=https://update.talend.com/Studio/8/base
      -Dtalend.studio.p2.update=https://update.talend.com/Studio/8/updates/R2023-02
      -Dtalend.job.context=dev 
      -Dtalend.job.applyContextToChildren=true 
      -fae 
      -e'
      goals: 'deploy'

      サポートされているマルチライン文字列の形式については、YAML構文のドキュメンテーションをお読みください。

    注: 指定したコンテキストグループがジョブに存在しない場合は、デフォルトのコンテキストグループが適用されます。
  • CICDプロジェクトのアーティファクトを.jarファイルか.zipファイルとしてビルド、クリーニング、テスト、パッケージ化し、Dockerレジストリーにデプロイメントする場合:
    options: '-f <ProjectName>/poms/pom.xml 
    -s <PathToDirectory>/maven_settings.xml 
    -Dlicense.path=<PathToDirectory>/license 
    -Dtalend.studio.p2.base=<updatesiteURL> 
    -Dtalend.studio.p2.update=<updatefolderPathOrURL> 
    -Djkube.docker.push.registry=<DockerRegistryName> 
    -Djkube.docker.username=<Dockerusername> 
    -Djkube.docker.password=<DockerPassword> 
    -Dtalend.docker.name=<DockerImageName> 
    -Xms1024m -Xmx3096m'
    goals: 'clean deploy'
    • Groovyスクリプトの例:

      options: '''-f CICD/poms/pom.xml 
      -s /home/talend/CI_dir/maven_settings.xml 
      -Dlicense.path=/home/talend/talend_studio/license 
      -Dtalend.studio.p2.base=https://update.talend.com/Studio/8/base
      -Dtalend.studio.p2.update=https://update.talend.com/Studio/8/updates/updateXXX.zip
      -Djkube.docker.push.registry=registry.example.com/group/project 
      -Djkube.docker.username=TalendUser 
      -Djkube.docker.password=V3ryCompl3xPwd 
      -Dtalend.docker.name=cicd4talend
      -Xms1024m 
      -Xmx3096m'''
      goals: 'clean deploy'

      サポートされているマルチライン文字列の形式については、Groovy構文のドキュメンテーションをお読みください。

    • YAMLスクリプトの例:

      options: '-f CICD/poms/pom.xml 
      -s /home/talend/CI_dir/maven_settings.xml 
      -Dlicense.path=/home/talend/talend_studio/license 
      -Dtalend.studio.p2.base=https://update.talend.com/Studio/8/base
      -Dtalend.studio.p2.update=https://update.talend.com/Studio/8/updates/updateXXX.zip
      -Djkube.docker.push.registry=registry.example.com/group/project 
      -Djkube.docker.username=TalendUser 
      -Djkube.docker.password=V3ryCompl3xPwd 
      -Dtalend.docker.name=cicd4talend
      -Xms1024m 
      -Xmx3096m'
      goals: 'clean deploy'

      サポートされているマルチライン文字列の形式については、YAML構文のドキュメンテーションをお読みください。