Deployment Choice: Code Promotion vs Artifact Promotion

  1. Code Promotion
  2. Artifact Promotion
Code Promotion Workflow
  • The workflow in code promotion strategy will be the development team will create features or bug fixes under a feature/bug-fix branch
  • Checkin into Dev branch
  • Build is trigged and deployed onto Dev Environment via CI/CD
  • Once the team pushed good amount of features and bug fixes to dev environment and if everything is fine on dev environment , dev branch is then merged to stage branch
  • Build is triggered and deployed onto stage environment via CI/CD
  • QA team does the verification either via manual tests or automated tests and provide sign off for production deployment
  • Stage branch is merged with prod branch
  • Build is triggered based on code in prod branch and deployed onto production environment.

The output after building the code which is an executable/binary/build is called Artifact.

Artifact Promotion Workflow
  • The workflow in artifact promotion strategy will be the development team will create features or bug fixes under a feature/bug-fix branch
  • Checkin into Dev branch
  • Build is trigged and deployed onto Dev Environment via CI/CD
  • Once the team pushed good amount of features and bug fixes to Dev and if everything is fine on dev, dev branch is then merged to master branch
  • Build is triggered and deployed into Stage environment via CI/CD
  • QA team does the verification either via manual tests or automated tests and provide sign off for production deployment
  • So the artifact that is well tested in Stage environment is now promoted or deployed to production environment

Config contains the information about resource handles to the databases, credentials to external services, hostnames. Config should always be maintained outside the code and never as constants inside code.

A good practice of deployment is to promote a well tested artifact and not the code.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store