Skip to content

feat(infra): update the deployment script - #163

Merged
Ayush8923 merged 14 commits into
mainfrom
feat/deployment-script-updates
Oct 12, 2026
Merged

Ayush8923 merged 14 commits into
mainfrom
feat/deployment-script-updates

Conversation

@Ayush8923

@Ayush8923 Ayush8923 commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Staging Deployment Script

  • Starts when Kaapi Guardrails CI finishes on main, not on every push.
  • Deploys only when CI passed on a push to main (PR runs are skipped).
  • Deploys the exact commit CI tested (git reset --hard <sha> on the server instead of origin/main).
  • Can also be run by hand from the Actions tab (workflow_dispatch).
  • Waits for the SSM command with aws ssm wait and a 10-minute timeout.
  • Posts the deploy result to Discord.

Production Deployment Script

  • New verify-ci job: if Kaapi Guardrails CI didn't pass on the tagged commit, the release stops.
  • deploy runs only after verify-ci passes.
  • Fixed the checkout ref (it used release.tag_name, which is empty when a tag is pushed).
  • Waits for the SSM command with aws ssm wait and a 15-minute timeout.
  • Posts the deploy result to Discord, with a note when CI blocked the release.

Before submitting a pull request, please ensure that you mark these task.

  • Ran fastapi run --reload app/main.py or docker compose up in the repository root and test.

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Repository: ProjectTech4DevAI/kaapi-guardrails/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 44aa048b-416d-4cd4-88cb-2a5a24d5b302

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Ayush8923 Ayush8923 self-assigned this Oct 7, 2026

@vprashrex vprashrex left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approved but added one major comment > The workflow name should be "Kaapi Guardrails CI", not "Kaapi CI". Otherwise this deploy won't trigger on merge.

--arg url "$RUN_URL" --argjson fields "$fields" \
'{embeds:[{title:$title,url:$url,color:$color,fields:$fields,timestamp:(now|todate)}]}')
curl -sf -H "Content-Type: application/json" -X POST -d "$payload" "$DISCORD_WEBHOOK_URL" \
|| echo "Discord notification failed to send"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can we use exit 1 if the webhook notification fails and include a reason indicating that the webhook failed?

Comment thread .github/workflows/deploy-staging.yml Outdated

on:
workflow_run:
workflows: ["Kaapi CI"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

suggestion use this

workflows: ["Kaapi Guardrails CI"]

there is no Kaapi Ci workflow name in this repo, the only Ci workflow name in this repo is Kaapi Guardrails CI

@Ayush8923
Ayush8923 merged commit e488485 into main Oct 12, 2026
2 checks passed
@Ayush8923
Ayush8923 deleted the feat/deployment-script-updates branch October 12, 2026 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants