CI/CD
Jenkins
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
:
package.json
Create a file called Jenkinsfile
in your repository with the following contents:
Jenkinsfile
Authentication
To run any commands, you must authenticate with Momentic. You can do this by adding the momentic-api-key
credential to your Jenkins instance.
- Create an API key in Momentic Cloud.
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