Deploying your project artifacts
- For more information on the Maven phases, see the Maven documentation.
- For examples of filters you can apply to the execution of your project items, see Filtering the execution of your project on selected artifacts.
Deploying to an artifact repository
Configure the pipeline script provided by Talend to deploy your artifacts to the artifact repository of your choice.
- From the Jenkins home page, select TalendSimplePipeline.
- Click Build with Parameters on the left panel to open the pipeline configuration page.
- In the MVN_GOALS parameter, define the Maven phase you want to
achieve, and make sure the profile stated is -Pnexus.
Example:
Parameter Example of default value MVN_GOALS deploy -Pnexus
- To define the artifact repository in which you want to deploy the project artifacts,
edit the repository URL stated in the MVN_GOALS
parameter.
The repository defined in the default script provided by Talend is the maven-releases remote repository.
Example to deploy artifacts into a Nexus snapshots repository (for projects under development and artifacts with a -SNAPSHOT version):Parameter Example of default value MVN_GOALS -DaltDeploymentRepository=maven-snapshots::default::http://localhost:8081/repository/maven-snapshots/
You need to specify your own artifact repository URL and there should not be any line breaks between the Maven goal and the -DaltDeploymentRepository parameter.
- Click Build to take your changes into account and build your artifacts.
Deploying to Talend Cloud
Configure the pipeline script provided by Talend to deploy your artifacts to Talend Management Console.
- From the Jenkins home page, select TalendSimplePipeline.
- Click Build with Parameters on the left panel to open the pipeline configuration page.
- In the MVN_GOALS parameter, define the Maven phase you want
to achieve, and make sure the profile stated is
-Pcloud-publisher.
Example:
Parameter Example of default value MVN_GOALS deploy -Pcloud-publisher
- To define the Talend Management Console
workspace and environment in which you want to deploy the project artifacts, edit the
Docker credentials stated in the TALEND_CI_BUILD_OPTIONS
parameter.Example to deploy artifacts (with screenshots) into a Talend Cloud account inside a workspace named ci-workspace on a prod environment:
Parameter Example of default value TALEND_CI_BUILD_OPTIONS -Dservice.url=https://tmc.eu.cloud.talend.com/inventory -Dcloud.token=XXX1234TalendCloudToken1234XXX -Dcloud.publisher.screenshot=true -Dcloud.publisher.environment=prod -Dcloud.publisher.workspace=ci-workspace
You need to specify your own Talend Cloud environment and workspace.
- Click Build to take your changes into account and build your artifacts.
Deploying to Docker
Configure the pipeline script provided by Talend to deploy your artifacts to Docker.
- From the Jenkins home page, select TalendSimplePipeline.
- Click Build with Parameters on the left panel to open the pipeline configuration page.
- In the MVN_GOALS parameter, define the Maven phase you want
to achieve, and make sure the profile stated is
-Pdocker.
Example:
Parameter Example of default value MVN_GOALS deploy -Pdocker
- To define the Docker registry in which you want to deploy the project artifacts,
edit the Docker credentials stated in the
TALEND_CI_BUILD_OPTIONS parameter.Example to deploy artifacts as the Docker image you have previously defined in the Docker registry of your choice:
Parameter Example of default value TALEND_CI_BUILD_OPTIONS -Dtalend.docker.name=cicd4talend -Djkube.docker.push.registry=talenddockerregistry -Djkube.docker.username=talenduser -Djkube.docker.password=Talenddock3rpassw0rd
- Click Build to take your changes into account and build your artifacts.
Multiple deployments at once
Configure the pipeline script provided by Talend to deploy your artifacts to multiple places (artifact repository, Talend Cloud, Docker).
- From the Jenkins home page, select TalendSimplePipeline.
- Click Build with Parameters on the left panel to open the pipeline configuration page.
- In the MVN_GOALS parameter, define the Maven phase you want
to achieve, and make sure the profiles stated correspond to where you want to deploy.
The list of profiles should be comma-separated.
Example:
Parameter Example of default value MVN_GOALS deploy -Pnexus,cloud-publisher
- To define the repositories and environments in which you want to deploy the project
artifacts, edit the parameter values stated in the
TALEND_CI_BUILD_OPTIONS parameter.Example to deploy artifacts both into a Nexus snapshots repository and a Talend Cloud account:
Parameter Example of default value TALEND_CI_BUILD_OPTIONS -DaltDeploymentRepository=maven-snapshots::default::http://localhost:8081/repository/maven-snapshots/ -Dservice.url=https://tmc.eu.cloud.talend.com/inventory -Dcloud.token=XXX1234TalendCloudToken1234XXX -Dcloud.publisher.screenshot=true -Dcloud.publisher.environment=prod -Dcloud.publisher.workspace=ci-workspace
- Click Build to take your changes into account and build your artifacts.