Continuous Integration and Continuous Deployment (CI/CD)
Each pull request will trigger a build in ChipperCI for testing and a QA site on dev Kubernetes cluster.
What We Are Using
- Digital Ocean
- Hosts the app
- Provides a QA environment for each branch on different non production cluster.
- GitHub
- Hosts the code and issue tracker.
- Runs automated testing.
- PHPUnit
- Used for PHP tests, including browser tests.
GitHub
Whenever you push to a branch containing an open pull request:
- GitHub Actions will run tests using PHPUnit. These include unit/integration tests as well as browser tests using Dusk.
- Platform will deploy an environment that you can use for manual QA and testing.
Kubernetes + Github Actions
We utilize GitHub Actions in conjunction with Helm to deploy application code to a production-grade Kubernetes cluster. Upon creating a pull request, a new QA environment is generated, and its URL is accessible based on your GitHub branch name. Developers conduct testing in the dev/test environment, undergo peer review.
Deploying to Master
To deploy to master, merge any open PR to master. Upon approval, the code is merged into the master branch. Subsequently, the CI/CD process initiates, deploying the code to the production Kubernetes cluster.
Troubleshooting Kubernetes deploy issues.
If a pull request does not create a new build in dev Kubernetes, there are a few reasons to look at first:
- Check if the Docker build for the application succeeded.
- Check if all the necessary infrastructure is created in a namespace related to your Git branch in the dev cluster.
- Check if the deploy stage succeeded in GitHub Actions.