How to Use MergeBase in: Jenkins
Mergebase
1. Find your Jenkins job you'd like to integrate
2. Click on Configure
3. Click on Add build step
4. Click on Execute shell
We're going to be adding a shell execution step to run the MergeBase CLT tool.
5. Add the script to download and run MergeBase
wget --header="X-Authorization: [token-here]" https://app.mergebase.com/{customerKey}/api/update/clt/mergebase.jar # your URL may be in the form: https://trial.mergebase.com/[your-comany-here]/api/update/clt/mergebase.jar java -jar mergebase.jar --name=TestPipeline ./pom.xml # optionally: add --ignoreExitCode if you want the build to succeed even when the project has vulnerabilities6. Grab your MergeBase Customer Token
7. Find your Customer Token here
Copy this token to your Jenkins script
8. Add the token to the MergeBase CLT step
Add the customer token to the script from above. You can modify the name of the project and target the file in your application that you'd like to scan. If this is a multi-module project, specify the module you'd like to scan in the command as shown below:
java -jar mergebase.jar --name=YourNameHere ./path/to/scan9. Save and exit
10. Build your target
11. Head back to the MergeBase dashboard
As you can see, your project has been scanned and you can view the full report for your application.