Ci Cd - nosiba28/SQA-Project GitHub Wiki

GitHub CI/CD

Continuous Integration/Continuous Deployment (CI/CD) is a vital component of modern software development, utilizing automation to streamline the process of delivering code changes from development to production environments. GitHub provides robust tools and workflows to facilitate CI/CD, empowering developers to automate testing, build, and deployment processes seamlessly.

Continuous Integration (CI)

Continuous Integration involves frequently integrating code changes into a shared repository, accompanied by automated tests to detect and address integration issues early in the development cycle. GitHub CI allows developers to set up workflows that automatically trigger builds and tests whenever new code is pushed to a repository or specific events occur, such as the opening of pull requests.

Key Components of CI

  1. Workflows: Define custom workflows using YAML syntax with GitHub Actions. Workflows consist of a series of jobs and steps, each representing tasks to be executed.

  2. Jobs and Steps: Jobs are individual units of work that can run concurrently within a workflow. They consist of one or more steps, each representing tasks like checking out code, running tests, or building artifacts.

  3. Actions: Actions are reusable units of code encapsulating tasks such as running tests or deploying applications. They can be authored by the community or the development team.

  4. Runners: GitHub provides virtual machines called runners to execute workflows. Runners can be hosted by GitHub (GitHub-hosted runners) or self-hosted on custom infrastructure (self-hosted runners).

Continuous Deployment (CD)

Continuous Deployment is the practice of automatically deploying code changes to production environments after passing through the CI process. GitHub offers various features and integrations to facilitate CD, enabling developers to automate the deployment process while maintaining control over the release pipeline.

Key Components of CD

  1. Deployment Environments: Define deployment environments like staging and production where applications are deployed. Each environment can have specific deployment requirements and configurations.

  2. Deployment Strategies: GitHub supports different deployment strategies, including rolling deployments, blue-green deployments, and canary deployments, enabling control over the release process and minimizing the impact of potential issues on end-users.

  3. Manual Approvals: Incorporate manual approval steps within workflows, allowing designated users or teams to review and approve deployments before promoting them to production environments.

  4. Integration with External Services: GitHub seamlessly integrates with various external services and platforms such as cloud providers (e.g., AWS, Azure, Google Cloud) and container orchestration tools (e.g., Kubernetes), facilitating automated deployments to these environments.

Benefits of GitHub CI/CD

  1. Increased Efficiency

  2. Improved Code Quality

  3. Faster Time to Market

  4. Enhanced Collaboration