From 2b15455ecd81d6c4878b0ae5bbbd749259f9825d Mon Sep 17 00:00:00 2001 From: rosie yohannan Date: Fri, 5 Dec 2025 14:38:57 +0000 Subject: [PATCH] add deploy name as required and remove linter rule thats broken --- .../pages/configure-deploy-markers.adoc | 47 +++++------ styles/circleci-docs/CodeBlockTitles.yml | 77 ------------------- 2 files changed, 19 insertions(+), 105 deletions(-) delete mode 100644 styles/circleci-docs/CodeBlockTitles.yml diff --git a/docs/guides/modules/deploy/pages/configure-deploy-markers.adoc b/docs/guides/modules/deploy/pages/configure-deploy-markers.adoc index 21e6a6c49d..e1156b23ad 100644 --- a/docs/guides/modules/deploy/pages/configure-deploy-markers.adoc +++ b/docs/guides/modules/deploy/pages/configure-deploy-markers.adoc @@ -7,9 +7,9 @@ This tutorial shows how to add a deploy marker step to your workflow config. Dep == Introduction -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]. +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. -For a full guide to CircleCI's deploys features and functionality, refer to the xref:deployment-overview.adoc[Deployment and deploy management] guide. +For a full guide to CircleCI's deploys features and functionality, refer to the xref:deployment-overview.adoc[Deployment and Deploy Management] guide. You can configure deploy markers as follows: @@ -43,6 +43,7 @@ CAUTION: We recommend configuring `circleci run release plan` and `circleci run 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. +.Plan your deployment [,yml] ---- jobs: @@ -73,8 +74,9 @@ Configuring `circleci run release plan` identifies the deployment you are planni This section provides some options for setting the `target-version` parameter. -* One option is to use CircleCI's built-in environment variables. For example you could define the target version as follows: +* One option is to use CircleCI's built-in environment variables. For example, define the target version as follows: + +.Example of setting target version using CircleCI's built-in environment variables [,yml] ---- --target-version="1.0.${CIRCLE_BUILD_NUM}-${CIRCLE_SHA1:0:7}" @@ -82,7 +84,7 @@ This section provides some options for setting the `target-version` parameter. + This configuration would yield a value with the following format `1.0.28853-ffdbeb1`. -* Another option is to use pipeline values. For example you could define the target version as follows: +* Another option is to use pipeline values. For example, define the target version as follows: + [,yml] ---- @@ -93,24 +95,13 @@ This configuration would yield a value with the following format `12345`. === 1.2. Update the deploy status to running -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. +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. 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. -[,yml] ----- -jobs: - deploy-my-service: - executor: some-executor - steps: - ... - (existing deployment commands) - ... - - run: circleci run release update --status=running ----- - -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. +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. +.Update the deploy status to running [,yml] ---- jobs: @@ -139,7 +130,7 @@ jobs: - run: name: Update planned release to SUCCESS command: | - circleci run release update \ + circleci run release update \ --status=SUCCESS when: on_success - run: @@ -148,7 +139,7 @@ jobs: if [ -f failure_reason.env ]; then source failure_reason.env fi - circleci run release update \ + circleci run release update \ --status=FAILED \ --failure-reason="$FAILURE_REASON" when: on_fail @@ -184,7 +175,7 @@ jobs: - run: name: Update planned release to CANCELED command: | - circleci run release update \ + circleci run release update \ --status=CANCELED ---- @@ -228,14 +219,14 @@ jobs: command: - run: name: Update planned deployment to running - command: circleci run release update --status=running + command: circleci run release update --status=running - run: name: Validate deployment command: - run: name: Update planned deployment to SUCCESS command: | - circleci run release update \ + circleci run release update \ --status=SUCCESS when: on_success - run: @@ -244,7 +235,7 @@ jobs: if [ -f failure_reason.env ]; then source failure_reason.env fi - circleci run release update \ + circleci run release update \ --status=FAILED \ --failure-reason="$FAILURE_REASON" when: on_fail @@ -254,7 +245,7 @@ jobs: - run: name: Update planned release to CANCELED command: | - circleci run release update \ + circleci run release update \ --status=CANCELED workflows: deploy-workflow: @@ -268,7 +259,7 @@ workflows: == Deploy logs without status updates -Sometimes you might not want your deployment marker to have any specific status, but still want it to be logged in the deploys UI. +Sometimes you might not want your deploy markers to have any specific status, but still want them to be logged in the deploys UI. In those cases you can use the `release log` command in place of `release plan` as shown in the example below. [,yml] @@ -326,7 +317,7 @@ You can also create an environment integration manually in the CircleCI web app. . Select the **Environments** tab. . Select btn:[Create Environment Integration]. . Enter a name for your environment, and a description if you would like. -. 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. +. 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. . Select btn:[Save and Continue]. == Next steps @@ -335,4 +326,4 @@ By following the steps in this guide, you have added a deploy marker to your Cir You can now track the status of your deployments across your configured environments in the CircleCI deploys UI and in the project home page. You can now: -* xref:set-up-rollbacks.adoc[Set up rollbacks]. +* xref:set-up-rollbacks.adoc[Set up Rollbacks]. diff --git a/styles/circleci-docs/CodeBlockTitles.yml b/styles/circleci-docs/CodeBlockTitles.yml deleted file mode 100644 index 45bf2525ef..0000000000 --- a/styles/circleci-docs/CodeBlockTitles.yml +++ /dev/null @@ -1,77 +0,0 @@ ---- -extends: script -scope: raw -level: warning -message: "Code blocks should have a title (line starting with '.' before the code block)." -link: https://github.com/circleci/circleci-docs -script: | - text := import("text") - matches := [] - - lines := text.split(scope, "\n") - - // Track delimiter counts for different types - listing_count := 0 // ---- - fenced_count := 0 // ```` - literal_count := 0 // .... - - for i, line in lines { - trimmed := text.trim_space(line) - - // Check for code block delimiters - is_listing_block := text.re_match("^-{4,}$", trimmed) - is_fenced_block := text.re_match("^`{3,}$", trimmed) - is_literal_block := text.re_match("^\\.{4,}$", trimmed) - - if is_listing_block || is_fenced_block || is_literal_block { - // Determine which count to use - current_count := 0 - if is_listing_block { - current_count = listing_count - } else if is_fenced_block { - current_count = fenced_count - } else if is_literal_block { - current_count = literal_count - } - - // Even count = opening delimiter, odd count = closing delimiter - is_opening := current_count % 2 == 0 - - if is_opening { - // Look back for a title, skipping empty lines and attributes - has_title := false - - for j := i - 1; j >= 0; j-- { - prev_trimmed := text.trim_space(lines[j]) - - // Skip empty lines and attribute lines (like [,yaml]) - if prev_trimmed == "" || text.has_prefix(prev_trimmed, "[") { - continue - } - - // Check if this line is a title - if text.has_prefix(prev_trimmed, ".") { - has_title = true - break - } - - // Found a non-attribute, non-empty line that's not a title - break - } - - if !has_title { - start := text.index(scope, line) - matches = append(matches, {begin: start, end: start + len(line)}) - } - } - - // Increment the appropriate counter - if is_listing_block { - listing_count = listing_count + 1 - } else if is_fenced_block { - fenced_count = fenced_count + 1 - } else if is_literal_block { - literal_count = literal_count + 1 - } - } - }