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
+27-22Lines changed: 27 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,12 +16,31 @@ For a full guide to CircleCI's deploys features and functionality, refer to the
16
16
* A CircleCI account connected to your code. You can link:https://circleci.com/signup/[sign up for free].
17
17
* A CircleCI project with a workflow configured to deploy your code.
18
18
19
-
== 1. Update the configuration
19
+
== 1. Create an envrionment
20
+
21
+
Our first step is to create an environment and component for your deployment. You can choose to skip this step if either of the following is true:
22
+
23
+
* You already have an environment set up in your organization.
24
+
* You are happy for CircleCI to automatically create an environment with the name `default` and a component with the name of your project.
25
+
26
+
=== 1.1 Create an environment integration
27
+
28
+
. In the link:https://app.circleci.com[CircleCI web app], select your org from the org cards on your user homepage.
29
+
. Select **Deploys** in the sidebar.
30
+
. Select the **Environments** tab.
31
+
. Select btn:[Create Environment Integration].
32
+
. Enter a name for your environment, and a description if you would like.
33
+
. 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.
34
+
. Select btn:[Save and Continue].
35
+
36
+
=== 1.2
37
+
38
+
== 2. Update the configuration
20
39
21
40
To create a deployment marker, you will update your CircleCI configuration file.
22
41
You will add commands to plan a deploy and then update its status based on the outcome of your deployment script.
23
42
24
-
=== 1.1. Plan a deploy
43
+
=== 2.1. Plan a deploy
25
44
26
45
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.
27
46
@@ -48,12 +67,12 @@ jobs:
48
67
deploy-my-service:
49
68
executor: some-executor
50
69
steps:
51
-
- run: circleci run release plan --environment-name=<some-environment-name> --component-name=<some-component-name> --target-version=<some-version-name> --namespace=<some-namespace>
70
+
- run: circleci run release plan <deploy-name> --environment-name=<some-environment-name> --component-name=<some-component-name> --target-version=<some-version-name> --namespace=<some-namespace>
52
71
----
53
72
54
73
In this example, note the following:
55
74
56
-
** The `environment-name` parameter sets the target environment. If the specified environment does not exist, it will be created.
75
+
** The `environment-name` parameter sets the target environment. If the specified environment does not exist, it will be created and named `default`.
57
76
** The `component-name` parameter sets the name that will be displayed in the Deploys UI.
58
77
** The `namespace` parameter is optional and can be provided to use a value other than `default`.
59
78
@@ -73,7 +92,7 @@ jobs:
73
92
In the example the positional argument `deploy-name` is the arbitrary value that will be used to identify the deployment and should be unique within the workflow.
74
93
If not specified, the deployment name will be set to `default`.
75
94
76
-
=== 1.2. Update the deploy status
95
+
=== 2.2. Update the deploy status
77
96
78
97
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.
79
98
@@ -144,7 +163,7 @@ echo "FAILURE_REASON='Deployment was not found'" > failure_reason.env
144
163
145
164
CAUTION: Trying to update the status of the deploy after updating it to a terminal status such as `SUCCESS`, `FAILED` or `CANCELED` is not supported and will result in an error.
146
165
147
-
=== 1.3 Update the deploy status to canceled
166
+
=== 2.3 Update the deploy status to canceled
148
167
149
168
If you want to update your deployment to `canceled` when the deploy job is canceled, you can do so by adding the following job to your configuration.
150
169
@@ -181,7 +200,7 @@ workflows:
181
200
182
201
This will make it sot that the job will be run only when the `deploy` job is canceled, thus updating the deployment to the `canceled` status.
183
202
184
-
=== 1.4. Full config example
203
+
=== 2.4. Full config example
185
204
186
205
For reference, here is a full example of a CircleCI config that makes use of the deployment tracking feature.
187
206
@@ -240,7 +259,7 @@ workflows:
240
259
- canceled
241
260
----
242
261
243
-
== 2. Deploy logs
262
+
== 3. Deploy logs
244
263
245
264
Sometimes you might not want your deployment marker to have any specific status, but still want it to be logged in the deploys UI.
246
265
In those cases you can use the `release log` command in place of `release plan` as shown in the example below.
@@ -278,20 +297,6 @@ jobs:
278
297
** (Optional) You can provide the following parameter if required:
279
298
*** The `namespace` parameter can be provided to use a value other than `default`.
280
299
281
-
[#manage-environments]
282
-
== 3. Manage environments
283
-
284
-
Configuring deploy markers will automatically create an environment integration in the link:https://app.circleci.com/deploys[CircleCI deploys UI] with the name you specified or with the `default` name if you didn't specify any.
285
-
You can then use the link:https://app.circleci.com/deploys/github/circleci#environments[CircleCI UI] to manage your environments, by creating, deleting or updating them.
286
-
To manually create an environment integration, follow these steps:
287
-
288
-
. In the CircleCI web app, select **Deploys** in the sidebar.
289
-
. If this is your first environment setup, select btn:[Create your first Environment Integration]. If you already have environments set up, choose the **Environments** tab and select btn:[Create Environment Integration].
290
-
. Enter a name for your environment, and a description if you would like.
291
-
. Use the dropdown menu to choose your environment integration type, then select btn:[Next: Release Agent Setup].
292
-
If you plan to only use deploy markers, as opposed to the Kubernetes agent, feel free to choose the `custom` type.
293
-
**You do not need to continue with installing a release agent at this point**, but you will need to reference this environment integration name as part of your config when adding the `log release` step below.
294
-
295
300
== Manual configuration of automatically detected deploys
296
301
297
302
If you have some link:https://circleci.com/changelog/auto-generated-deploy-markers-are-being-sunset/[automatically detected deploy markers] you can consider manually configuring them. CircleCI no longer automatically creates deploy markers for you.
0 commit comments