Adapting the pipeline script to use a referenced project - Cloud

Talend Software Development Life Cycle for Cloud - Best Practices Guide

Version
Cloud
Language
English (United States)
Product
Talend Cloud
Module
Talend Artifact Repository
Talend Management Console
Talend Studio
Content
Administration and Monitoring
Deployment
Design and Development

How to configure the pipeline script provided by Talend to generate the artifacts of a referenced project.

A project reference is a property that you can set for a project so that all or some of the project items can be referenced by another project. When one project is stored on GIT, its items are structured in master and branches so that the reference can be established at either levels to provide more flexibility in project usability.

Procedure

  1. Open the Talend_Pipeline configuration page and go to the Script editor.
  2. To clone the reference project of your choice, replace the 'Git Checkout' stage defined in the default script provided by Talend with the following stage.

    Example

    stage ('Update sources from GIT') {
            // first git repository
            dir('.repo1') {
                git(
                        url: GIT_URL,
                        credentialsId: GIT_CREDENTIALS_ID,
                        branch: 'master'
                    )
            }
            sh "rm -rf $PROJECT_GIT_NAME"
            sh "cp -r .repo1/$PROJECT_GIT_NAME ."
            // other git repository (same way to checkout / copy)
        }
    allows you to copy artifacts from one Git repository (repo1) to another Git repository so that all artifacts can be accessed and used from the same repository.
    Note: The example is adapted for Unix environments. If you are using Windows, replace sh with bat in the example.
  3. Click Save to take your changes into account.