Specify the parameters to generate the sources - 6.5

Talend Software Development Life Cycle Best Practices Guide

author
Talend Documentation Team
EnrichVersion
6.5
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 Repository Manager
Talend Studio
How to configure the GenerateSources project on Jenkins to generate the sources of your Jobs and Tests.

Before you begin

Procedure

  1. In the GenerateSources project configuration, set the path to the BuildJob_pom.xml file holding the instructions to generate sources in the Root POM field of the Build area.
  2. In the Goals and options field, enter the Maven instruction to generate sources.
    org.talend:ci.builder:6.4.1:<local->generate

    Use local-generate to generate sources in script mode (recommended), or use generate to generate sources remotely.

  3. (Optional) If you want to perform a non-local generation (not recommended), 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
    -Dcommandline.workspace=<jenkins_path>/workspace/GenerateSources/projects
    -Dcommandline.host=localhost
    -Dcommandline.port=8002
    -Dcommandline.user=xxx@talend.com
    -DprojectsTargetDirectory=<jenkins_path>/workspace/RunTests/projectSources
    -DitemFilter=(type=process)and(path=TEST)

    For more information on these parameters, see Create the POM file to generate sources.

    For examples of filters you can apply to the execution of your project items, see How to filter the execution of your project on a single Job or specific Jobs.

    Tip: The only requirement is to store all projects in the workspace folder, this means you have the possibility create a Jenkins task that clones the projects and copy them (folders only) to the workspace.
  4. If your project is on Git, you need to specify the folder in which your projects will be checked out (Use custom workspace) in the Advanced part of the Build area. This path needs to be the same as the one you will use in your Talend CommandLine (see Executing the Tests).

    <jenkins_path>/workspace/GenerateSources/projects

    You also have the possibility to check out one specific project in your repository by entering its name in Additional Behaviours > Sparse Checkout paths.

    Example:

    CI_PROJECT

  5. 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

  6. (Optional) Add a post-build action to get it to run the next project, the RunTests project, that will run all the tests.