Before you begin
- You have created the build pipeline on your Continuous Integration server, Jenkins in this example. See Creating the Jenkins pipeline.
- You know the path to the pom files of the artifacts you want to execute
(Standard Jobs, Big Data Jobs, Routes, etc.). These files are available in
the Studio workspace, in the
- To filter on Standard Jobs, the path to be used will be jobs/process/jobName_version
- To filter on Big Data Jobs, the path to be used will be jobs/process_mr/jobName_version
- To filter on Routes, the path to be used will be jobs/routes/routeName_version
- To filter on Data Services, the path to be used will be jobs/services/serviceName_version
- Open the configuration page of the pipeline.
In the Script area, edit the Maven commands and
parameters that allow you to filter the Jobs according to your needs:
-plto generate a specific artifact (Job and Test, Route, etc.) rather than every artifact located in the project.Example:
-pl jobs/process/job_feature956_0.1to deploy only the
job_feature956Standard Job with a 0.1 version.Tip: To build several artifacts, separate their names with commas.
-am(if the artifact has been specified with
-pl) to build simultaneously the child dependencies of a specific artifact located in a project.Example:
-pl jobs/process/jobparent_feature950_0.1 -am
to deploy the parent Job named jobparent_feature950 with a 0.1 version as well as its child Job (jobchild_feature950_0.1) and sub-child Job (jobsubchild_feature950_0.1).
-amd(if the project has been specified with
-pl) to build simultaneously the parent dependencies of a specific artifact located in a project.
to generate the sub-child Job named jobsubchild_feature950 with a 0.1 version as well as the Jobs that depend on this one, jobchild_feature950_0.1) and jobparent_feature950).
-pl jobs/process/jobsubchild_feature950_0.1 -amdNote: As the
-amdcommand builds all modules that depend on the specified Job, all the dependencies needed to generate this Job, such as routines, need to be pre-generated.
Example of Maven command used to clean the project build directory (deleting old files), launch the generation of the route_feature950 Route and its dependencies and deploy the packages on the Nexus Artifact repository you have defined:
-fn -e -pl jobs/routes/route_feature950_0.1 -amd
The -amd parameter is mandatory to publish a Route as the dependencies of the Route need to be generated in order to publish it.
Example of Maven command used to take the generated project and package the Java code of all artifacts inside this project as a Docker image.
-Pdocker package -fn -e
- Save your changes and close the configuration page.