Specify the parameters to generate and deploy the sources - 7.0

Talend Software Development Life Cycle Best Practices Guide

author
Talend Documentation Team
EnrichVersion
7.0
EnrichProdName
Talend Big Data
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
task
Administration and Monitoring
Deployment
Design and Development
EnrichPlatform
Talend Administration Center
Talend Artifact Repository
Talend CommandLine
Talend JobServer
Talend Studio
How to configure the Generate_Execute_Deploy project on Jenkins to generate the Jobs and Tests of your project.

Before you begin

Procedure

  1. Open the Generate_Execute_Deploy project configuration page.
  2. In the Maven Info Plugin Configuration, select the This project is parameterized check box, then:
    1. Select Add Parameter > Choice Parameter.
    2. Define a name for your choice parameter, mygoals for example.
    3. In the Choices field, enter the following:
      generate-sources
      compile
      test
      package
      install
      deploy
    When you will build the Jenkins project, you will be able to select which Maven goal you want to achieve. For more information on the Maven phases, see the Maven documentation.
  3. Add another Choice parameter by clicking Add Parameter > Choice Parameter:
    1. Define a name for your choice parameter, deploy_nexus for example.
    2. In the Choices field, enter the following:
      -DaltDeploymentRepository=snapshots::default::http://<nexus_host>:<nexus_port>/repository/maven-snapshots/
      -DaltDeploymentRepository=releases::default::http://<nexus_host>:<nexus_port>/repository/maven-releases/

      where <nexus_host> and <nexus_port> refer to the host and port of your Nexus web application.

    When you will build the Jenkins project using the deploy phase parameter, you will be able to select in which Nexus repository you want to deploy your project artifacts.
  4. In the Root POM field of the Build area, set the path to the pom.xml file holding the instructions to generate sources. By default, the parent pom file is located in poms/pom.xml.
  5. In the Goals and options field, enter the Maven instruction to generate and deploy your project sources.
    clean ${mygoals} -fn -e

    where ${mygoals} is calling the Maven phases you have defined previously in the choice parameters.

  6. Set the other necessary Maven parameters in the MAVEN_OPTS field of the Advanced part of the Build area (plugin execution information as well as parameters needed to generate the sources).
    Tip: Note that the Maven documentation of the CI Builder plugin is embedded in the CI Builder archive file, see the files in the <CIBuilder_home>/help folder for more information.

    Field

    Parameters

    MAVEN_OPTS
    -Dproduct.path=<studio_path>
    -Dgeneration.type=local
    ${deploy_nexus}

    where <studio_path> refers to your Talend Studio installation directory and ${deploy_nexus} is calling the choice parameter you have defined previously.

    For examples of filters you can apply to the execution of your project items, see How to filter the execution of your project on selected Jobs using Maven.

  7. In the Advanced part of the Build area, select Settings file in filesystem in the Settings file list and point to the Maven settings file of the Studio with all the dependencies needed to generate the sources.

    <studio_path>/configuration/maven_user_settings.xml