Defining the Maven options to build your project - Cloud

Talend Software Development Life Cycle for Cloud - Best Practices Guide

EnrichVersion
Cloud
EnrichProdName
Talend Cloud
EnrichPlatform
Talend Artifact Repository
Talend Management Console
Talend Studio
task
Administration and Monitoring
Deployment
Design and Development

You have the possibility to adapt the Maven build command to fit your deployment needs. Here are some examples of commands:

  • To build, test, package artifacts of the CICD project as .jar or .zip files and deploy them to the Nexus snapshots repository :
    options: '-f <ProjectName>/poms/pom.xml -s <PathToDirectory>/settings.xml -Dlicense.path=<PathToDirectory>/license -Dupdatesite.path=<updatesiteURL> -Dpatch.path=<patchPath> -DaltDeploymentRepository=snapshots::default::http://XXX:8081/repository/snapshots/ -fae -e'
    goals: 'deploy'

    Example:

    options: '-f CICD/poms/pom.xml -s /home/talend/CI_dir/settings.xml -Dlicense.path=/home/talend/talend_studio/license -Dupdatesite.path=http://company/updatesite -Dpatch.path=D:/patches/Patch_TPS-2222.zip -DaltDeploymentRepository=snapshots::default::http://nexus:8081/repository/snapshots/ -fae -e'
    goals: 'deploy'

    Example with a Job that uses custom components (additional parameters are required to point to the artifact repository in which the custom components are stored):

    options: '-f CICD/poms/pom.xml -s /home/talend/CI_dir/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 
    -Dupdatesite.path=http://company/updatesite 
    -Dpatch.path=D:/patches/Patch_TPS-2222.zip
    -DaltDeploymentRepository=snapshots::default::http://nexus:8081/repository/snapshots/ 
    -fae -e'
    goals: 'deploy'

    Example with a Job that uses context groups:

    options: '-f CICD/poms/pom.xml -s /home/talend/CI_dir/settings.xml -pl jobs/process/parent_0.1 -am  
    -Dlicense.path=/home/talend/talend_studio/license
    -Dupdatesite.path=http://company/updatesite 
    -Dpatch.path=D:/patches/Patch_TPS-2222.zip
    -Dtalend.job.context=dev 
    -Dtalend.job.applyContextToChildren=true 
    -fae -e'
    goals: 'deploy'
    Note: If the context group you specify does not exist on the Job, the default context group will be applied.
  • To build, clean, test, package artifacts of the CICD project as .jar or .zip files and deploy them to a Docker registry :
    options: '-f <ProjectName>/poms/pom.xml -s <PathToDirectory>/settings.xml -Dlicense.path=<PathToDirectory>/license -Dupdatesite.path=<updatesiteURL> -Dpatch.path=<patchPath> -Ddocker.push.registry=<DockerRegistryName> -Ddocker.push.username=<Dockerusername> -Ddocker.push.password=<DockerPassword> -Dtalend.docker.name=<DockerImageName> -Xms1024m -Xmx3096m'
    goals: 'clean deploy'

    Example:

    options: '-f CICD/poms/pom.xml -s /home/talend/CI_dir/settings.xml -Dlicense.path=/home/talend/talend_studio/license -Dupdatesite.path=http://company/updatesite -Dpatch.path=D:/patches/Patch_TPS-2222.zip -Ddocker.push.registry=registry.example.com/group/project -Ddocker.push.username=TalendUser -Ddocker.push.password=V3ryCompl3xPwd -Dtalend.docker.name=cicd4talend -Xms1024m -Xmx3096m'
    goals: 'clean deploy'
  • To build, clean, test, package artifacts of the CLOUDCICD project as .jar or .zip files and deploy them to the CloudCI workspace or the Prod environment in Talend Cloud :
    options: '-f <ProjectName>/poms/pom.xml -s <PathToDirectory>/settings.xml -Dlicense.path=<PathToDirectory>/license -Dupdatesite.path=<updatesiteURL> -Dpatch.path=<patchPath> -Dservice.url=<TalendCloudServiceURL> -Dcloud.publisher.screenshot=true -Dcloud.publisher.environment=<ManagementConsoleEnvironment> -Dcloud.publisher.workspace=<ManagementConsoleWorkspace> -Xms1024m -Xmx3096m'
    							goals: 'clean deploy'

    Example:

    options: '-f CLOUDCICD/poms/pom.xml -s /home/talend/CI_dir/settings.xml -Dlicense.path=/home/talend/talend_studio/license -Dupdatesite.path=http://company/updatesite -Dpatch.path=D:/patches/Patch_TPS-2222.zip -Dservice.url= https://tmc.eu.cloud.talend.com/inventory -Dcloud.publisher.screenshot=true -Dcloud.publisher.environment=Prod -Dcloud.publisher.workspace=CloudCI -Xms1024m -Xmx3096m'
    goals: 'clean deploy'
    Note: The artifact published to Talend Cloud cannot be larger than 400MB.