Continuous delivery: Automatic creation of tasks in Talend Administration Center
Overview
Continuous delivery occurs when developers frequently hand off new code to the quality assurance (QA) and operations teams for testing. It usually involves a production-like staging area, and there is often a time lag between a release and when it is reviewed, when changes are manually accepted and when the new code is released to production.
Within Talend, the goal of continuous delivery is to use Jenkins to automate the creation of Talend Administration Center tasks in the Job Conductor and deploy them on the Job Servers along with the option of configuring Triggers (Simple, Cron, File-based) for scheduling.
This article describe one of the ways to build this Jenkins Job to perform continuous delivery. However, based on the SDLC process defined within your project group, the design and implementation can differ.
For more information on MetaServlet, see Metaservlet API.
For more information on the options available under MetaServlet, see Metaservlet API commands.
For a recorded expert session on MetaServlet, see Talend Virtual CSM.
Prerequisites
- The Continuous Integration (CI) implementation is already setup:
- The Jobs which are to be promoted to Testing and Pre-Production environments should be published to the Releases folder of the Nexus Artifacts Repository.
- The necessary software, such as Jenkins, Maven, Talend Administration Center, Git and Nexus are setup and running.
- The Jenkins Job is configured to build from Git, generate source files using CI-Builder, build the artifacts, test using Maven and publish to Nexus.
Implementing the configuration file and groovy script
Implement continuous delivery with a configuration file and a groovy script.
To implement continuous delivery, you need to implement two files:
- a configuration file that describes the list of tasks that are identified to be deployed into the concerned testing or other environments
- a groovy script that uses this task description file to create the Base64 encoded message needed to invoke the MetaServlet API to create all the tasks in the Talend Administration Center portal
The configuration file provides the required parameters for the MestaServlet APIs to manage the task (create, update, deploy) in a text format that a script file can parse and generate the necessary Metaservlet request API. The parameters are used to create Triggers for FileBased, Cron or Simple types. You can provide these parameters in different formats: txt, CSV, JSON.