-
Notifications
You must be signed in to change notification settings - Fork 6
Feature/continous integration continous delivery #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,43 @@ | ||||||||||||||||||
| # Continuous Integration and Continuous Delivery | ||||||||||||||||||
|
|
||||||||||||||||||
| Continuous Integration and Continuous Delivery (CI/CD) is a software development practice that aims to automate the building, testing, and deploying of code changes in a frequent and reliable manner. It helps to ensure that new features can be delivered faster, bugs are caught earlier, and the codebase remains more stable. To achieve faster delivery, automation is used to test and validate all changes and provide feedback to the developer on the state of the system with the inclusion of the changes. | ||||||||||||||||||
|
|
||||||||||||||||||
| ## Continuous Integration | ||||||||||||||||||
|
|
||||||||||||||||||
| Pull requests to merge code changes triggers the automation pipeline. The pipeline runs validation checks and ensures the changes are ready for peer review. The following stages go into detail how the code changes are validated. This pipeline needs to reside in a dedicated, preferrably ephemeral, environment. | ||||||||||||||||||
|
|
||||||||||||||||||
| ### Building | ||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think 1-3 are "building". 4 definitely is. Maybe this could be "Building and analysis" or separate sections. 1&2 could realistically be part of Testing below.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let me place 1-3 in a "Style and Static Analysis" section. I would like to keep the "Testing" section to unit tests and functional tests (with deployment steps to the PR environment), unless you feel strongly about including 1&2 in that section. |
||||||||||||||||||
| 1. Style/lint checks. Ensure consistency in coding styles and convention makes code easier to read and understand. | ||||||||||||||||||
| 2. Static analysis tools. Scans code for quality and potential security risks. | ||||||||||||||||||
| 3. Dependency auditing. Checks third party package for vulnerabilities and updates. | ||||||||||||||||||
| 4. Compilation (for compiled code). Catches syntax/compliation errors. | ||||||||||||||||||
|
||||||||||||||||||
| 1. Style/lint checks. Ensure consistency in coding styles and convention makes code easier to read and understand. | |
| 2. Static analysis tools. Scans code for quality and potential security risks. | |
| 3. Dependency auditing. Checks third party package for vulnerabilities and updates. | |
| 4. Compilation (for compiled code). Catches syntax/compliation errors. | |
| 1. Style/lint checks. Ensure consistency in coding styles and conventions, making code easier to read and understand. | |
| 2. Static analysis tools. Scan code for quality and potential security risks. | |
| 3. Dependency auditing. Checks third-party packages for vulnerabilities and updates. | |
| 4. Compilation (for compiled code). Catches syntax/compilation errors. |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 1. Run unit tests. Code changes include new unit tests and modifying existing tests to ensure functionality is working as expected. | |
| 1. Run unit tests. New code changes should include new unit tests and modification of existing tests to ensure functionality is working as expected. |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 2. Enforce test Coverage. Ensures code base meets testing coverage threshold. | |
| 2. Enforce test coverage. Ensures code base meets testing coverage threshold. |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 4. Run database migrations. Scaffolding database and running migrations to build a consistent database that mirrors those in production. | |
| 4. Run database migrations. Using a database that has similar data and identical structure as that in production, run new migrations and verify the results are as expected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this definitely sounds much better than my initial sentence.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 6. Run functional/integration tests. These tests are written from the perspective of end user/application feature perspective. A typical example uses browser drivers that mimic user interactions with the application, in a repeatable deterministic script. | |
| 6. Run functional/integration tests. These tests are written from the perspective of end-users. A typical example uses browser drivers that mimic user interactions with the application, in a repeatable deterministic script. |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 1. Peer code review and approval. Peer review is ready once all automated checks passes. This ensures that the changes meet the minimum validation threshold before review begins. Any new code changes during the review will trigger the automation pipeline again. | |
| 1. Peer code review and approval. Peer review is ready once all automated checks pass. This ensures that the changes meet the minimum validation threshold before the review begins. Any new code changes during the review will trigger the automation pipeline again. |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the author merges the changes.
While I prefer to merge my own changes, it's pretty common for the reviewer, not the author to merge. One major issue with doing that in a CD system like this though is that the original author may not be aware when the code goes out and available to help if the deploy fails.
I see that you're not actually doing full CD - where changes roll out to prod automatically - so its less of a concern.
Not sure if you want to discuss any of this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. In the past, we've done both reviewer merges and author merges. I will mention both options with pro/con of either approach. Having a reliable notification system (to the author of the PR) definitely helps with reviewer merging the PR.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 1. Deploy code to qa/staging environment. This environment is a long-lived environment for feature acceptance. | |
| 1. Deploy code to QA/staging/UAT environment. This environment is a long-lived environment for feature acceptance. |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 2. Run database migrations. Run any wew migrations. | |
| 2. Run database migrations. Run any new migrations. |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous ones in this section read as imperatives (commands). This one doesn't.
| 4. Feature Acceptance on staging environment. | |
| 4. Perform feature acceptance on the staging environment. |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Production deployment strategy should include handling rollback and recovery in case of any issues that might happen during deployment. Using release tagging with a version control like Git can help reverting the application to a previously known working state. Combined with regular backups of application data and configuration, will enable fast rollback in case of failure. The follow are steps recommended when deploying to production. | |
| A good production deployment strategy should include handling rollback and recovery in case of any issues that might happen during deployment. Using release tagging with a version control system like Git can help with reverting the application to a previously known working state. Combined with regular backups of application data and configuration, will enable fast rollback in case of failure. The following are steps recommended when deploying to production. |
or the chatgpt take:
| Production deployment strategy should include handling rollback and recovery in case of any issues that might happen during deployment. Using release tagging with a version control like Git can help reverting the application to a previously known working state. Combined with regular backups of application data and configuration, will enable fast rollback in case of failure. The follow are steps recommended when deploying to production. | |
| A robust production deployment strategy must encompass rollback and recovery procedures for potential deployment issues. Leveraging release tagging within a version control system such as Git facilitates reverting the application to a proven, stable state. Paired with routine backups of application data and configuration, this ensures swift rollback capabilities in the event of failure. The following steps are recommended for production deployment:``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like ChatGPT's version with maybe a few of the word replacements removed. Ex: "Paired" vs "Combined".
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are inconsistencies in the terminology used throughout the guide. At times, "source control" is referenced without an article, while in other instances, it's preceded by "the."
| 2. Manual approval for merging of the release tag to the source control. This acts as the final trigger for deployment to production. | |
| 2. Manual approval for merging of the release tag to source control. This acts as the final trigger for deployment to production. |
There's also some inconsistency in sentence structure for these steps...
For instance, in Step 1, Create a release tag in source control, the language resembles an instructional command. Conversely, in Step 2, Manual approval for merging of the release tag to source control, the phrasing lacks coherence as it appears more like a topic than a complete sentence. Achieving consistency in both terminology and sentence structure across all steps would enhance clarity and readability.
I think this applies to the other sections of this doc as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me do another path through this to try to fix up the sentence structure. This is definitely a product of my "bullet point" draft -> turning it into a "guide" approach to writing this up.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 3. Automation triggers on the merging of the release tag to the source control. The automation should run through the build stage with the same checks a those for the continous integration build steps. | |
| 3. Automation triggers on the merging of the release tag to source control. The automation should run through the build stage with the same checks as those for the continuous integration build steps. |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 4. The testing stage would run the full unit test suites, and User Acceptance Testing suites in the functional end to end testing if the application has special UAT created accounts on the production application. The goal is to have a set of UAT tests that validates the deployment but not impact production data. | |
| 4. In the testing stage, full unit test suites, User Acceptance Testing (UAT) suites, and end-to-end functional testing are conducted. If the application utilizes special UAT accounts on the production environment, these are also included. The objective is to perform UAT tests that validate the deployment without affecting production data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.