Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,27 @@ jobs:
- image: cimg/base:current
steps:
- checkout
- run:
name: Plan deployment
command: |
circleci run release plan "${CIRCLE_JOB}" \
--environment-name="default" \
--component-name="${CIRCLE_PROJECT_REPONAME}" \
--target-version="1.0.${CIRCLE_BUILD_NUM}-${CIRCLE_SHA1:0:7}"
- run:
name: Deploy
command: echo "Deploying application..."
- run:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 MEDIUM RISK

The 'Update deployment status to running' step is currently positioned after the 'Deploy' step. This means the deployment will only be marked as 'RUNNING' after the command has already finished. Furthermore, if the 'Deploy' step fails, the 'RUNNING' status will never be recorded, causing the release to jump from 'PLANNED' to 'FAILED'. Move this step to occur immediately after 'Plan deployment' but before the 'Deploy' step.

Try running the following prompt in your coding agent:

Move the 'Update deployment status to running' step in .circleci/config.yml to occur after 'Plan deployment' but before the 'Deploy' step.

name: Update deployment status to running
command: circleci run release update "${CIRCLE_JOB}" --status=RUNNING
- run:
name: Update deployment status to success
command: circleci run release update "${CIRCLE_JOB}" --status=SUCCESS
when: on_success
- run:
name: Update deployment status to failed
command: circleci run release update "${CIRCLE_JOB}" --status=FAILED
when: on_fail

workflows:
say-hello-workflow:
Expand Down
Loading