Identifying the components
Before writing your pipeline, the first step is to identify the various components required for your deployment. This step will help you decide the necessary tasks and the order in which they should occur.
Let's think about what operations are needed every time you perform a commit on your source code:
- Clone the repository: The CI/CD pipeline will need a fresh copy of your code base to prepare the next steps.
- Install the required libraries: The containers that are running the testing and linting processes will need to download the necessary modules to perform these operations.
- Test the code: The test suite should be executed and halt the deployment process if the tests do not pass.
- Lint the code: The code should follow the coding standards for this project, or the application should not be allowed to be deployed.
- Build and push the image: Build a container image and push it to a registry.
- Deploy the application...