-
Notifications
You must be signed in to change notification settings - Fork 10
feat(continuous-deployment): Update deployment scripts #1191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
64839a4
60185fe
3c7a560
3703ab0
c4f492d
254f6b5
c71f66e
a18f2bf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -109,4 +109,5 @@ def custom_openapi(): | |
| async def health() -> dict[str, str | float]: | ||
| return { | ||
| "status": "ok", | ||
| "sha": settings.GIT_SHA, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: sed -n '1,75p' .github/workflows/deploy-staging.yml
sed -n '1,90p' docker-compose.staging.yml
rg -n -C 4 'GIT_SHA|build.args|environment:|env_file|docker compose|git pull' .github/workflows/deploy-staging.yml docker-compose.staging.yml backendRepository: ProjectTech4DevAI/kaapi-backend Length of output: 17229 🏁 Script executed: set -e
printf '%s\n' '--- tracked GIT_SHA references ---'
rg -n -C 3 --hidden --glob '!.git' 'GIT_SHA|/health|health.*sha|sha.*health' .github docker-compose.staging.yml backend scripts .env* 2>/dev/null || true
printf '%s\n' '--- secret fetch script ---'
sed -n '1,220p' scripts/fetch-secrets.sh
printf '%s\n' '--- staging workflow remainder ---'
sed -n '75,145p' .github/workflows/deploy-staging.yml
printf '%s\n' '--- release build context ---'
sed -n '50,80p' .github/workflows/create-release.yml
printf '%s\n' '--- health tests/docs ---'
rg -n -C 5 --hidden --glob '!.git' 'health' tests backend README.md .github 2>/dev/null | head -240 || trueRepository: ProjectTech4DevAI/kaapi-backend Length of output: 27399 🤖 get_repo_knowledge executed:
Length of output: 5705 Pass the deployed commit to the EC2 Compose build. The EC2 path pulls Pinning the Suggested fix# docker-compose.staging.yml
build:
context: ./backend
+ args:
+ GIT_SHA: ${GIT_SHA:-unknown}
...
build:
context: ./backend
+ args:
+ GIT_SHA: ${GIT_SHA:-unknown}
...
build:
context: ./backend
+ args:
+ GIT_SHA: ${GIT_SHA:-unknown}# .github/workflows/deploy-staging.yml
-... && SECRET_ID='"$SECRET_ID"' sh scripts/fetch-secrets.sh && docker compose -f docker-compose.staging.yml build && ...
+... && SECRET_ID='"$SECRET_ID"' sh scripts/fetch-secrets.sh && GIT_SHA=$(git rev-parse HEAD) && export GIT_SHA && docker compose -f docker-compose.staging.yml build && ...🤖 Prompt for AI Agents |
||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when this script was initially written, this value was hardcoded, which isn’t ideal. It should be picked from secrets instead, so if it changes in the future, we can update it easily without having to make changes to the workflow every time.