Skip to main content Skip to complementary content

Adapting the pipeline script to use a referenced project

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.
    Information noteNote: 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.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!