Creating the Azure build pipeline
Configure the pipeline script provided by Talend to generate the project items according to the Maven phase you want to achieve and the repository you want to deploy your artifacts to.
Adapting the YAML parameters to your environment
Some parameters and credentials that will be used in the pipeline come from the secure files you stored in Azure DevOps. For more information about the Talend Maven parameters you can use when configuring your pipeline, see Talend custom Maven build options.
- Extract the azure-pipeline.yml file from the azure-pipeline.zip archive file.Information noteWarning: This file is an example and must be adapted to your environment before it is used. It gives you some predefined Maven commands and options that you can customize to fit your deployment needs. For example, the azure-pipeline.yml script file allows you to build and publish artifacts to Talend Management Console. If you want to publish artifacts to an artifact repository or to Docker, uncomment the corresponding parameters in the script.
- Edit and adapt the values in the file according to your environment: Information noteNote: All the project variables have been set in the script to simplify the import in Azure DevOps, but as a good practice, they can be externalized in the Pipeline variables and defined as variables in the GUI to update them more easily. Refer to Configuring Azure DevOps to add the pipeline variables, then remove their declaration from the script.
Parameter Description Example of value project_name Talend Project name as it is declared in Talend Management Console or Talend Administration Center. The value of the project_name variable must be in upper case otherwise it might cause build failure. If you used special characters in the project name or have any doubts on its final syntax you can check it in the parent pom.xml file of your project (talend.project.name variable in <project>/poms/pom.xml).
CICD jobs_to_build The list of Jobs to build, with comma-separated values. Use the format jobs/process/<PATH>/<name_of_the_job>_<version> for Jobs, and jobs/routes/<PATH>/<name_of_the_route>_<version> for ESB Routes. The name of the Job or Route is in lowercase.
If you need to build the full project, remove the parameter -pl ${JOB_LIST} from the mvn commandline.
jobs/process/LOAD/hello_world_0.1 tmc_env Talend Cloud environment. DEV tmc_workspace Talend Cloud target workspace. The Talend CI user must have the Publish permission on this workspace. CICD reinstall_cmdline Forces the Talend CommandLine reinstallation. It is required for any new version of the Talend CI Builder, or new licenses. false - Comment/Uncomment the build stages corresponding to Talend Cloud ('talend_ci_tmc' section), your artifact repository ('talend_ci_artifactrepo' section), or Docker ('talend_ci_docker' section) in the script according to your needs.
Creating and configuring your pipeline
The first step to create your build pipeline is to import your Git repository where your source artifacts are stored.
- Go to the Pipelines page.
- Click Create pipeline.
- In the Connect and Select steps, select your source repository type, select the repository hosting the Talend project you want to import, then give permissions to Azure to access it.
- In the Configure step, select Starter pipeline in order to configure the steps of your pipeline.
- In the Review step, paste the content of the azure-pipeline.yml file you have previously adapted to fit your deployment needs.
- Click Save to save and run the pipeline.