You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/modules/deploy/pages/configure-deploy-markers.adoc
+19-28Lines changed: 19 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,9 +7,9 @@ This tutorial shows how to add a deploy marker step to your workflow config. Dep
7
7
8
8
== Introduction
9
9
10
-
Deploy markers provide a lightweight way to log your deployments. If you install deploy markers, as described in this guide, you will also be able to use the xref:set-up-rollbacks.adoc[CircleCI rollback feature].
10
+
Deploy markers provide a lightweight way to log your deployments. If you install deploy markers, as described in this guide, you will also be able to use the rollback feature. For more information on rollbacks, see the xref:set-up-rollbacks.adoc[Set up Rollbacks] guide.
11
11
12
-
For a full guide to CircleCI's deploys features and functionality, refer to the xref:deployment-overview.adoc[Deployment and deploy management] guide.
12
+
For a full guide to CircleCI's deploys features and functionality, refer to the xref:deployment-overview.adoc[Deployment and Deploy Management] guide.
13
13
14
14
You can configure deploy markers as follows:
15
15
@@ -43,6 +43,7 @@ CAUTION: We recommend configuring `circleci run release plan` and `circleci run
43
43
44
44
Add a `circleci run release plan` command to your deployment job. This tells CircleCI to plan a new deploy and show it in the link:https://app.circleci.com/deploys[Deploys UI] with `pending` status.
45
45
46
+
.Plan your deployment
46
47
[,yml]
47
48
----
48
49
jobs:
@@ -73,16 +74,17 @@ Configuring `circleci run release plan` identifies the deployment you are planni
73
74
74
75
This section provides some options for setting the `target-version` parameter.
75
76
76
-
* One option is to use CircleCI's built-in environment variables. For example you could define the target version as follows:
77
+
* One option is to use CircleCI's built-in environment variables. For example, define the target version as follows:
77
78
+
79
+
.Example of setting target version using CircleCI's built-in environment variables
This configuration would yield a value with the following format `1.0.28853-ffdbeb1`.
84
86
85
-
* Another option is to use pipeline values. For example you could define the target version as follows:
87
+
* Another option is to use pipeline values. For example, define the target version as follows:
86
88
+
87
89
[,yml]
88
90
----
@@ -93,24 +95,13 @@ This configuration would yield a value with the following format `12345`.
93
95
94
96
=== 1.2. Update the deploy status to running
95
97
96
-
WARNING: The `circleci run release update` command is only for use with deploy markers. If you are using the CircleCI xref:release-agent-overview.adoc[release agent] for Kubernetes deployments, do NOT use the `update` commands. The release agent automatically handles status updates for you.
98
+
WARNING: The `circleci run release update` command is only for use with deploy markers. If you are using the CircleCI release agent for Kubernetes deployments, do NOT use the `update` commands. The release agent automatically handles status updates for you. See the xref:release-agent-overview.adoc[Release Agent Overview] page for more details.
97
99
98
100
After deploying your application, you can update the status of the deployment to `RUNNING` by running the `circleci run release update` command in a new step.
99
101
100
-
[,yml]
101
-
----
102
-
jobs:
103
-
deploy-my-service:
104
-
executor: some-executor
105
-
steps:
106
-
...
107
-
(existing deployment commands)
108
-
...
109
-
- run: circleci run release update --status=running
110
-
----
111
-
112
-
If you are deploying multiple components or to multiple environments from a single workflow, you need to provide the command with a deployment name. The deploy name value should match the value you provided when you planned the deploy.
102
+
Remember to provide your deploy name when using the `update` commands. The deploy name value should match the value you provided when you planned the deploy. If you did not provide a deploy name when you planned the deploy, you can use the `default` value.
113
103
104
+
.Update the deploy status to running
114
105
[,yml]
115
106
----
116
107
jobs:
@@ -139,7 +130,7 @@ jobs:
139
130
- run:
140
131
name: Update planned release to SUCCESS
141
132
command: |
142
-
circleci run release update \
133
+
circleci run release update <deploy-name> \
143
134
--status=SUCCESS
144
135
when: on_success
145
136
- run:
@@ -148,7 +139,7 @@ jobs:
148
139
if [ -f failure_reason.env ]; then
149
140
source failure_reason.env
150
141
fi
151
-
circleci run release update \
142
+
circleci run release update <deploy-name> \
152
143
--status=FAILED \
153
144
--failure-reason="$FAILURE_REASON"
154
145
when: on_fail
@@ -184,7 +175,7 @@ jobs:
184
175
- run:
185
176
name: Update planned release to CANCELED
186
177
command: |
187
-
circleci run release update \
178
+
circleci run release update <deploy-name> \
188
179
--status=CANCELED
189
180
----
190
181
@@ -228,14 +219,14 @@ jobs:
228
219
command: <your-deployment-logic>
229
220
- run:
230
221
name: Update planned deployment to running
231
-
command: circleci run release update --status=running
222
+
command: circleci run release update <deploy-name> --status=running
232
223
- run:
233
224
name: Validate deployment
234
225
command: <your-validation-logic>
235
226
- run:
236
227
name: Update planned deployment to SUCCESS
237
228
command: |
238
-
circleci run release update \
229
+
circleci run release update <deploy-name> \
239
230
--status=SUCCESS
240
231
when: on_success
241
232
- run:
@@ -244,7 +235,7 @@ jobs:
244
235
if [ -f failure_reason.env ]; then
245
236
source failure_reason.env
246
237
fi
247
-
circleci run release update \
238
+
circleci run release update <deploy-name> \
248
239
--status=FAILED \
249
240
--failure-reason="$FAILURE_REASON"
250
241
when: on_fail
@@ -254,7 +245,7 @@ jobs:
254
245
- run:
255
246
name: Update planned release to CANCELED
256
247
command: |
257
-
circleci run release update \
248
+
circleci run release update <deploy-name> \
258
249
--status=CANCELED
259
250
workflows:
260
251
deploy-workflow:
@@ -268,7 +259,7 @@ workflows:
268
259
269
260
== Deploy logs without status updates
270
261
271
-
Sometimes you might not want your deployment marker to have any specific status, but still want it to be logged in the deploys UI.
262
+
Sometimes you might not want your deploy markers to have any specific status, but still want them to be logged in the deploys UI.
272
263
In those cases you can use the `release log` command in place of `release plan` as shown in the example below.
273
264
274
265
[,yml]
@@ -326,7 +317,7 @@ You can also create an environment integration manually in the CircleCI web app.
326
317
. Select the **Environments** tab.
327
318
. Select btn:[Create Environment Integration].
328
319
. Enter a name for your environment, and a description if you would like.
329
-
. Use the dropdown menu to choose your environment integration type. Choose the "Custom" option to follow along with this guide,. If you are deploying to your Kubernetes cluster you can or if you want to use the CircleCI release agent, then choose "Kubernetes Cluster" and head over to the xref:set-up-circleci-deploys.adoc[Release agent setup] page.
320
+
. Use the dropdown menu to choose your environment integration type. Choose the "Custom" option to follow along with this guide,. If you are deploying to your Kubernetes cluster you can or if you want to use the CircleCI release agent, then choose "Kubernetes Cluster" and head over to the xref:set-up-circleci-deploys.adoc[Set up the CircleCI Release Agent] page.
330
321
. Select btn:[Save and Continue].
331
322
332
323
== Next steps
@@ -335,4 +326,4 @@ By following the steps in this guide, you have added a deploy marker to your Cir
335
326
You can now track the status of your deployments across your configured environments in the CircleCI deploys UI and in the project home page.
0 commit comments