Tidelift can integrate with Jenkins through Jenkins Pipeline.
This example will complete a basic tidelift alignment save, causing Tidelift to check the project's manifest against the correct Tidelift Catalog. If alignment is below 100%, the CLI will return exit status 1, and the build will fail.
It also can optionally be set to not fail the build when not fully aligned, but simply note the failed alignment as part of the build.
This is meant to be an example to build upon.
- The project already has a
.tideliftfile with correctTIDELIFT_ORGANIZATIONandTIDELIFT_PROJECTvariables set. See the Tidelift documentation for more on.tideliftfiles. - This example is for a Maven-based project. You may need to tweak the
toolsconfiguration inside the Jenkinsfile based upon your project.
Add the Jenkinsfile-example configuration in this repository to your project repository, rename it to Jenkinsfile, and examine it, especially the comments.
The example has a section which requires inputting a value for TIDELIFT_API_KEY. This key should be stored using Jenkins' Pipeline credential mechanisms. More information on Jenkins credentials is available here.