The following example shows how to use Momentic with Jenkins.For more usage examples, see the momentic-ai/examples repository.For a given root package.json:
Copy the value to a safe place. You’ll need it in a moment.
Add a new global credential to your Jenkins controller.
At the top of your Jenkinsfile, provide the following environment variables to the pipeline:
Jenkinsfile
Copy
Ask AI
pipeline { agent any // To authenticate, set the following environment variables. environment { MOMENTIC_API_KEY = credentials('momentic-api-key') } // ...}