Conteúdo do Curso
Introduction to QA Automation Testing
Introduction to QA Automation Testing
Intro to a CI/CD Pipeline
What is CI/CD?
- CI stands for Continuous Integration: It's a practice where developers frequently integrate their code into a shared repository. However, an important part of CI is to ensure that changes made by one developer don't break the system when combined with the changes made by others. Every time code is integrated, automated tests are run to ensure everything is working;
- CD stands for Continuous Delivery/Deployment: Once the code is integrated and tested, the next step is to automatically deliver it. In Continuous Delivery, the application is automatically prepared for release to a production environment, but a human can decide when it actually goes live. In Continuous Deployment, the code is automatically deployed to production after passing tests, with no human intervention;
A CI/CD pipeline for a Node.js application typically involves the following steps:
- Code Commit: A developer writes code and pushes it to a version control system like GitHub or GitLab;
- Automated Testing (CI): As soon as code is committed, the CI system runs automated tests to ensure that the new changes don’t break the application. This is part of the greater Regression Testing;
- Build (CI): If the tests pass, the application is built. For Node.js, this could involve tasks like bundling JavaScript files, compiling TypeScript (if used), or preparing assets;
- Deployment: The application is automatically deployed to the host. Some popular hosting platforms include Microsoft Azure, AWS, Heroku, etc;
Tools used in CI/CD for Node.JS
- GitHub / GitLab / Bitbucket: For version control and repository management;
- Jenkins / CircleCI / GitLab CI: These tools help automate the process of testing and building the application when code is pushed to the repository;
- Docker: Docker is used in the deployment step. It packages the Node.js app into a virtual container, making it easier to deploy in any environment;
- Microsoft Azure / AWS / Heroku: Services where your Node.js app can be hosted and deployed;
We will be using GitHub for repository management and Jenkins to automate the testing process.
The deployment of the application can be integrated into Jenkins right after the automated tests have been performed, however it requires the knowledge of Docker, which is a more suitable topic for a DevOps course.
Obrigado pelo seu feedback!