Create and run a Jenkins Job for continuous delivery.
Procedure
Click New Item to add a new Jenkins Job.
Select a Freestyle project and update the name accordingly.
Set up the Source Code Management (SCM) repository where the JSON configuration
file is located.
This example uses Git, with a repository named
ci-artifacts-repo. The default branch is
master.
It is recommended to have a branch for each Talend
environment (DEV, TEST, PRE-PROD, PROD, etc.). Each branch will have its own
version of the JSON task list. Optionally, the name of this branch can be passed
as a Job parameter with master as a default.
In Build Environment, select the Inject
environment variables to the build process check box and set the
Talend Administration Center address and
login information as environment variables.
This way, you avoid hard-coding any parameters in the script. The
JSON_CONFIG_FILE name is also exposed in case the
default name must be changed.
Optionally, these environment variables can also be saved in the SCM
repository as a property file.
The environment variables TAC_URL,
TAC_ADMIN_USER, TAC_ADMIN_PWD and
JSON_CONFIG_FILE are used by the Groovy script.
Add a build step to retrieve the groovy script.
The script is copies into the Jenkins Job workspace using the Provide configuration
file plugin.
The name TALEND_TASK_MANAGEMENT is the name used to
store the Groovy script, update it accordingly.
Add a build step which uses the default Groovy installation to execute the
Groovy script located in the workspace.
The script path is provided by the environment variable
TALEND_TASK_MANAGMENT defined above.
Optionally:
When Talend Administration Center
is configured with SSL, you can add the Java truststore path (where
the TAC certificate/Public Key has been imported) and the truststore
password as Java OTPS (update
accordingly).