CI/CD
CircleCI
The following example shows how to use Momentic with CircleCI.
For more usage examples, see the momentic-ai/examples repository.
For a given root package.json
:
package.json
Create a file called .circleci/config.yml
in your repository with the following contents:
config.yml
Authentication
To run any commands, you must authenticate with Momentic. You can do this by setting the MOMENTIC_API_KEY
environment variable in your CircleCI project settings.
- Create an API key in Momentic Cloud.
Copy the value to a safe place. You’ll need it in a moment.
- Go to your CircleCI project settings and click on the Environment Variables tab. Create a new secret called
MOMENTIC_API_KEY
and enter the value of your API key.
- CircleCI automatically loads environment variables stored in project settings into the CI environment. No modifications are necessary for the CI file.