So to recap, here’s what we’ve created so far.
- A full-stack serverless app that includes:
- A way to handle secrets locally
- A way to run unit tests for our infrastructure and functions
- Deployed to a prod environment with a custom domain
All of this is neatly committed in a Git repo.
So far we’ve been deploying our app locally through our command line. But if we had multiple people on our team, or if we were working on different features at the same time, we won’t be able to work on our app because the changes would overwrite each other.
To fix this we are going to implement a CI/CD pipeline for our full-stack serverless app.
What is a CI/CD Pipeline
CI/CD or Continuous Integration/Continuous Delivery is the process of automating deployments by tying it to our source control system. So that when new code changes are pushed, our app is automatically tested, built and deployed.
A CI/CD pipeline usually includes multiple environments. An environment is one where there are multiple instances of our deployed app. So we can have an environment called production that our users will be using. And development environments that we can use while developing our app.
Here is what our workflow is going to look like:
- Our repo will be connected to our CI/CD service.
- Any commits that are pushed to the
mainbranch will be automatically:
- And deployed to prod
Our workflow is fairly simple. But as your team grows, you’ll need to add additionaly dev and staging environments.
CI/CD for Serverless
To fix this we created a service called Seed. It requires no scripts and is built specifically for serverless. It also allows you to monitor and debug your serverless app. This is something we’ll be doing later in the guide.
We should mention that you don’t have to use Seed. And this section is completely optional.
Let’s get started with setting up your project on Seed.