|
1 | 1 | # Continuous Delivery |
2 | | -Continuous delivery is the practice of having a deployment pipeline. Each stage of the pipeline gets the code going through the pipeline closer to production. |
| 2 | +Continuous Delivery is the practice of having a deployment pipeline and is the |
| 3 | +default mode in GitVersion. Each stage of the pipeline gets the code going |
| 4 | +through the pipeline closer to production. |
3 | 5 |
|
4 | | -The topic itself is rather large, here we will just focus on the building and creation of *releasable* artifacts. This is only a part of continuous delivery as a whole, with the hard part being the ability to measure the impacts of what you have deployed into production. |
| 6 | +The topic itself is rather large, here we will just focus on the building and |
| 7 | +creation of *releasable* artifacts. This is only a part of continuous delivery |
| 8 | +as a whole, with the hard part being the ability to measure the impacts of what |
| 9 | +you have deployed into production. |
5 | 10 |
|
6 | 11 | In essence continuous delivery means: |
7 | 12 |
|
8 | 13 | - Your code is automatically built and tested |
9 | | - - If any of the automated tests fail, the teams #1 priority is to fix the build |
| 14 | + - If any of the automated tests fail, the team's #1 priority is to fix the |
| 15 | + build |
10 | 16 | - If the build is green, the application can be deployed at any time |
11 | 17 | - Ideally the business should make that decision |
12 | 18 | - The same artifacts which were built and tested should be deployed |
13 | 19 | - That means no rebuilding everything when you are deploying |
14 | 20 |
|
15 | | -Continuous delivery does not work well with GitFlow. The reason is that you are required to *merge* to master to do a release, triggering a rebuild and a new set of artifacts to go through your pipeline. Depending on how long your pipeline is, this could be a while. |
16 | | - |
17 | | -GitHubFlow is a better fit for Continuous delivery, the [mainline development](mainline-development.md) model means that every merged feature branch will be built as a *stable* version and if the build/builds go green then you are free to deploy to production at any time. |
18 | | - |
19 | | -## How continuous delivery affects GitVersion |
20 | | -The thing about continuous delivery is that there will be *multiple* candidates to deploy to production and it is a human choice to deploy. This means that GitVersion will build **the same semantic version** until that version is deployed. |
21 | | - |
22 | | -GitVersion assumes Continuous Delivery by default in it's [configuration](../configuration.md), if you want to do [continuous deployment](continuous-deployment.md) then just change the configuration setting. |
| 21 | +Continuous delivery does not work well with GitFlow. The reason is that you are |
| 22 | +required to *merge* to master to do a release, triggering a rebuild and a new |
| 23 | +set of artifacts to go through your pipeline. Depending on how long your |
| 24 | +pipeline is, this could be a while. |
| 25 | + |
| 26 | +GitHubFlow is a better fit for Continuous delivery, the |
| 27 | +[mainline development](mainline-development.md) model means that every merged |
| 28 | +feature branch will be built as a *stable* version and if the build/builds go |
| 29 | +green then you are free to deploy to production at any time. |
| 30 | + |
| 31 | +## Usage |
| 32 | +By default, GitVersion is set up to do Continuous Delivery on all branches but |
| 33 | +`develop`, which is set up with [Continuous Deployment](continuous-deployment.md). |
| 34 | +To change the mode to Continuous Delivery, change your |
| 35 | +[configuration](../configuration.md) to: |
| 36 | + |
| 37 | +```yaml |
| 38 | +mode: ContinuousDelivery |
| 39 | +``` |
| 40 | +
|
| 41 | +## How Continuous Delivery affects GitVersion |
| 42 | +The thing about continuous delivery is that there will be *multiple* candidates |
| 43 | +to deploy to production and it is a human choice to deploy. This means that |
| 44 | +GitVersion will build **the same semantic version** until that version is |
| 45 | +deployed. For instance: |
| 46 | +
|
| 47 | + - 1.1.0+5 |
| 48 | + - 1.1.0+6 |
| 49 | + - 1.1.0+7 <-- This is the artifact we release, tag the commit which created |
| 50 | + this version |
| 51 | + - 1.1.1+0 |
| 52 | +
|
| 53 | +Tags are required in this mode to communicate when the release is done as it's |
| 54 | +an external manual process. |
23 | 55 |
|
24 | 56 | ## Resources |
25 | 57 | - [Continuous Delivery on Wikipedia](https://en.wikipedia.org/wiki/Continuous_delivery) |
26 | | - - [Continuous Delivery, the book](http://www.amazon.com/Continuous-Delivery-Deployment-Automation-Addison-Wesley/dp/0321601912) |
| 58 | + - [Continuous Delivery, the book](http://www.amazon.com/Continuous-Delivery-Deployment-Automation-Addison-Wesley/dp/0321601912) |
0 commit comments