One of the cornerstones of Cloud Native applications is the ability to deliver features as soon as possible to our customers. For this to become a reality we tend to rely on CI/CD pipelines that create the link between the coding stage and the deployment of a tested application. In this type of scenarios, the developer will make the changes in the codebase and submit those as part of a pull/merge request. That pull/merge request will be evaluated by other team members for correctness, and will also be analyzed by a CI/CD pipeline.
This pipeline includes stages such as compiling the code, performing unit tests, running linters, executing integration and end-to-end test, etc. Once all the required tests have passed, and the request is approved, another pipeline is triggered. This new CD pipeline is usually involved in creating and publishing the container images, rendering the YAML files required to deploy a component, and either publishing the results to another repository for a GitOps approach, or pushing the changes to a target Kubernetes cluster.
The NAPPTIVE Playground provides a method to easily get on-demand Kubernetes namespaces that can be used for many of the CI/CD use cases, from integration testing to deployment of the newly released application. To illustrate how to accomplish this with the Playground, we have created a demo application with NodeJS to showcase how CI/CD system such as a GitHub Action can be used in conjunction with NAPPTIVE to deploy an application.
The project considers a scenario where a repository (i.e., example-app-nodejs) has a set of associated GitHub Actions that are automatically triggered whenever a new merge is performed on the master branch of the repository. The different actions illustrate how to:
- Push applications to the catalog
- Deploy applications from the catalog
- Create isolated testing environments
- Run unit and integration tests
- Run acceptance tests
- Deploy into a production environments once all tests pass.
Want to try it out?
Follow the instructions on the example NodeJS project, fork it, and discover how CI/CD pipelines can easily leverage systems such as the NAPPTIVE Playground.