Skip to content

Commit a53f57a

Browse files
committed
continue rearranging deploy markers content
1 parent 598c33f commit a53f57a

File tree

1 file changed

+27
-22
lines changed

1 file changed

+27
-22
lines changed

docs/guides/modules/deploy/pages/configure-deploy-markers.adoc

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,31 @@ For a full guide to CircleCI's deploys features and functionality, refer to the
1616
* A CircleCI account connected to your code. You can link:https://circleci.com/signup/[sign up for free].
1717
* A CircleCI project with a workflow configured to deploy your code.
1818

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
2039

2140
To create a deployment marker, you will update your CircleCI configuration file.
2241
You will add commands to plan a deploy and then update its status based on the outcome of your deployment script.
2342

24-
=== 1.1. Plan a deploy
43+
=== 2.1. Plan a deploy
2544

2645
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.
2746

@@ -48,12 +67,12 @@ jobs:
4867
deploy-my-service:
4968
executor: some-executor
5069
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>
5271
----
5372

5473
In this example, note the following:
5574

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`.
5776
** The `component-name` parameter sets the name that will be displayed in the Deploys UI.
5877
** The `namespace` parameter is optional and can be provided to use a value other than `default`.
5978

@@ -73,7 +92,7 @@ jobs:
7392
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.
7493
If not specified, the deployment name will be set to `default`.
7594

76-
=== 1.2. Update the deploy status
95+
=== 2.2. Update the deploy status
7796

7897
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.
7998

@@ -144,7 +163,7 @@ echo "FAILURE_REASON='Deployment was not found'" > failure_reason.env
144163

145164
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.
146165

147-
=== 1.3 Update the deploy status to canceled
166+
=== 2.3 Update the deploy status to canceled
148167

149168
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.
150169

@@ -181,7 +200,7 @@ workflows:
181200

182201
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.
183202

184-
=== 1.4. Full config example
203+
=== 2.4. Full config example
185204

186205
For reference, here is a full example of a CircleCI config that makes use of the deployment tracking feature.
187206

@@ -240,7 +259,7 @@ workflows:
240259
- canceled
241260
----
242261

243-
== 2. Deploy logs
262+
== 3. Deploy logs
244263

245264
Sometimes you might not want your deployment marker to have any specific status, but still want it to be logged in the deploys UI.
246265
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:
278297
** (Optional) You can provide the following parameter if required:
279298
*** The `namespace` parameter can be provided to use a value other than `default`.
280299

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-
295300
== Manual configuration of automatically detected deploys
296301

297302
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

Comments
 (0)