After the simple pipeline works, you can try to further customize the pipeline by
adding some extra stages to meet your needs.
Here are several examples of additional stages for the Jenkins pipeline:
- Executes the
detectCVE
command, and then archives the report so it can be downloaded from the GUI (available from R2022-03, with Talend CI Builder 8.0.3 or higher)stage ('Detect CVE') { talend_ci.executeWithMaven("org.talend.ci:builder-maven-plugin:${CI_BUILDER_VERSION}:detectCVE -DcveReportFilePath=${WORKSPACE}/cvereport.csv") archiveArtifacts artifacts: 'cvereport.csv' }
For more information about the
detectCVE
command, see Detecting the fixed vulnerabilities (CVEs) of your artifacts while building. - Executes the
install
command to install Talend CommandLine (available from R2022-04, with Talend CI Builder 8.0.4 or higher)stage ('Install CommandLine') { talend_ci.executeWithMaven("org.talend.ci:builder-maven-plugin:${CI_BUILDER_VERSION}:install ") }
For more information about the
install
command, see Installing Talend CommandLine in a standalone step. - Executes the Depgraph Maven Plugin to generate a list of all dependencies of a
project, including the Job hierarchy and libraries (requires the POM files to be
generated)
stage ('List Dependencies') { talend_ci.executeWithMaven("com.github.ferstl:depgraph-maven-plugin:4.0.1:aggregate -DgraphFormat=json -f ./" + env.PROJECT_TO_BUILD+"/poms/pom.xml "+ " -DoutputFileName=./depgraph.json " ) archiveArtifacts artifacts: '**/depgraph.json' }
Such stages can be found in Talend Academy courses. Our professional services could also assist you with the customization.