Note: Only normal scanning is supported through pipeline.
To create a pipeline job:
- Select the New Item.
- Enter a name for the item.
- Select Pipeline.
If the Pipeline option is unavailable, you'll need to go back and install the Jenkins Pipeline plug-in.
- Click OK.
Configure the pipeline job
To configure the pipeline job:
- Go to the Pipeline section on your job's configuration page and do one of the following:
- Choose Pipeline script and insert your script.
- Choose Pipeline script from SCM from the definition dropdown menu, then follow the instructions below.
- Select Git from the dropdown menu.
- Enter the Repository URL.
- Select your credentials from the dropdown menu.If you haven't configured your credentials, do the following:
- Click the Add dropdown menu.
- Select Kind > Username with password.
- Provide your scm username and enter your access token in the password field.
- Enter your branch name for the Branch Specifier field.
- Accept the default values.
- Click Apply, then Save.
- Click Build Now to build your pipeline job.
Note:
- PR comment is not supported through pipeline.
coverity_project_nameandcoverity_stream_nameare mandatory parameters for pipeline.
Generate pipeline syntax
To generate syntax for your pipeline:
- Navigate to Dashboard > JOB NAME.
- Click on Pipeline Syntax from the sidebar.
- Go to the Steps section.
- Select security_scan: Black Duck Security Scan from the Sample Step dropdown menu.
- Complete the necessary fields in the form.
- Click Generate Pipeline Script.
- Copy the generated pipeline script to your Jenkinsfile.
- Store the Jenkinsfile at the root level in your repository.
Note: Even if you have set all your configurations globally, you may need to add additional configurations to your Jenkinsfile. For more information, see the following: