Your CI/CD Pipeline with Nitric

Nitric integrates seamlessly into CI/CD pipelines to abstract and automate infrastructure management. It’s an action that can slot into your workflow much like any other CLI.

Familiar CI/CD tools like GitLab CI and GitHub Actions work great with Nitric. With hooks for pre and post actions, workflows may continue to leverage tools that ensure best practices and standards are met: security scans, linting, performance monitoring, compliance checks, etc. Nitric also supports various cloud environments and IaC tools so you have flexibility in your deployment.

Here’s a typical deployment pipeline with Nitric:

diagram

Build

Developers commit their application code to a code repository and utilize the Nitric SDK to manage cloud resources. This SDK simplifies the resource management process by abstracting infrastructure complexities, allowing developers to focus on coding. This ensures consistent resource configurations across environments, reducing the risk of configuration drift and speeding up the development process.

Commit

Your Nitric application code is committed as usual with Git to take advantage of your version control and rollback capabilities. However, unlike traditional processes, the resource specification and infrastructure code isn’t checked in; Nitric generates those in real-time when a deployment is triggered.

Trigger

Nitric slots in with the pre and post-actions that you currently have configured in your deployment pipeline.

For example, you may have pre-actions in place such as application unit tests, other tools/scans, and IaC module unit tests.

Once those are complete, you’ll trigger deployment with the Nitric CLI. This will automate the creation of resource specifications, container images, and deployment scripts. Deployment scripts are generated by mapping resource requirements from the specification with IaC providers like Pulumi or Terraform. Depending on the provider choice, resources can be immediately provisioned with Nitric or you can output IaC for tools like Terraform.

Once Nitric deployment is complete, you can trigger your existing post-actions, such as static script analysis, additional tools/scans for security, and optional provisioning with other IaC CLIs. The option to provision with an IaC CLI provides flexibility in managing infrastructure using preferred tools.

This workflow ensures consistent resource provisioning across all environments and enforces governance policies to maintain infrastructure control.

Release

Nitric allows you to deploy to the cloud of your choice without any changes to your codebase. The Nitric Providers you select will provision the right cloud resources according to the application's requirements, ensuring optimal performance, least privilege permissions and cost efficiency.

Providers have already been written for a variety of foundational services such as APIs, storage buckets, key value store, queues etc. You can learn more about building your own providers or extending existing ones here.

CI/CD Guides

Nitric has several guides for integrating with popular CI/CD pipelines.

GitHub Actions

Use GitHub Actions to deploy your Nitric application.

GitLab Actions

Use GitLab CI to deploy your Nitric application.

Azure Pipelines

Use Azure Pipelines to deploy your Nitric application.

Google Cloud Build

Use Google Cloud Build to deploy your Nitric application.