What Is CI/CD

Continuous Integration & Continuous Delivery / Deployment

  • CI & CD are Best Practices for software development and deployment.
  • They enable frequent software changes to be applied whilst maintaining system and service stability.
  • Companies like AWS, Netflix, Google, and Facebook have pioneered this approach to releasing code, successfully applying thousands of changes per day.

Continuous Integration Workfloa

  • Multiple developers working on different features or bug fixes
  • All contributing to the same application
  • Sharing the same code repository (e.g. git)
  • Frequently pushing their upidates into the shared repo - atleast daily

-- Next Stage --

  • Code Respository integrated with a build management system
  • Code changes trigger an automated build
  • We need a way to ensure that any code change does not break the build or introduce new bugs in the application

-- Next Stage --

  • The test system runs automated tests on the newly built application
    • Unit tests
    • Integration tests
    • Function tests
  • Identifies any bugs, preventing issues from being introduced in the master code
  • CI focuses on small code changes which are frequently committed to the main repository once they have been successfully tested

Continuous Delivery / Deployment

  • CD can mean either Continuous Delivery or Continuous Deployment
  • Continuous Delivery is a Development practice where merged changes are automatically built, tested, and prepared for release into staging and eventually production environments.
  • There is ususally a manual decision process to initiate deployment of the new code

-

  • After testing, take the deployable packaged application and deploy to environments

-

  • Continuous deployment takes the idea of automation one step further and automatically deploys the new code following successful testing, eliminating any manual steps
  • The new code is automatically released as soon as it passes through the stages of your release process (build, test, package)
  • Small changes are released early and frequently
  • Both practices require the build, test, and deployment processes to be fully automated but Continuous Deployment also automates the release process as well

  • there is no human intervention to deploy the package into our environments

    • Don't need someone to initiate release
    • Decision to release code is built into the logic of CI/CD pipeline

AWS Continuous Integration & Continuous Deployment Tools

  • CodeCommit
    • Code Repos
  • CodeBuild
    • Build management system
    • Compiles source code
    • Can run some tests
    • Software packages
  • CodeDeploy
    • Deploy packaged application
    • Deploy code to either EC2, on promise, and even lambda functions
  • All of this is part of CodePipeline
    • CD Service that allows you to model, visualize, and automate your entire release process
    • Use Code Pipeline to orchestrate all activities and completely automate release

CI / CD Exam Tips

  • Read this White Paper
  • Continuous integration is about integrating or merging the code changes frequently
    • atleast once per day, enables multiple devs to work on the same application
  • Continuous Delivery is all about automating the build, test, and deployment functions
    • human intervention is usually needed to trigger deployment to environments
  • Continuous Deployment fully automates the entire release process, code is deployed into Production as soon as it has successfully passed through the release pipeline
  • AWS Code Commit - Source control service (git)
  • AWS Code Build - compile source code, run tests, and package code
  • AWS Code Deploy - automated deployment to EC2, on premises systems and lambda
  • AWS Code Pipeline - CI / CD workflow tool, fully automates the entire release process (build, test, deployment)