-
Notifications
You must be signed in to change notification settings - Fork 4
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
[AAQ-583] CI/CD for GCP #264
Conversation
- "admin_app/**" | ||
- "deployment/gcp/cloudbuild_admin_app.yaml" | ||
- ".github/workflows/deploy_gcp_admin_app.yaml" |
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.
Trigger only if the component code or CI/CD scripts change
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.
All deployment scripts follow the same pattern!
docker build \ | ||
--build-arg NEXT_PUBLIC_BACKEND_URL=https://$$DOMAIN/api \ | ||
--build-arg NEXT_PUBLIC_GOOGLE_LOGIN_CLIENT_ID=$$NEXT_PUBLIC_GOOGLE_LOGIN_CLIENT_ID \ | ||
-t ${_DOCKER_REGISTRY_DOMAIN}/$PROJECT_ID/${_RESOURCE_PREFIX}/admin_app:latest \ | ||
. | ||
secretEnv: ["NEXT_PUBLIC_GOOGLE_LOGIN_CLIENT_ID", "DOMAIN"] |
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.
Secret environment variables are accessed by $$<var>
, substituted variables (which we pass in github actions) are accessed by $<var>
and must start with _
env: "DOMAIN" | ||
|
||
images: | ||
- "${_DOCKER_REGISTRY_DOMAIN}/$PROJECT_ID/${_RESOURCE_PREFIX}/admin_app:latest" |
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.
$PROJECT_ID
is availabe through cloudbuild direclty, rather than from GCP Secret Manager or Github Actions
2a0ffec
to
0576049
Compare
* send caddyfile and docker compose via scp * remove ssh key * format multiline commnad * fix docker compose name * use docker run * fix multiline command * build admin_app from github actions * remove cloudbuild file trigger * temporarily add this branch as trigger for admin_app * update litellm cicd to build from github actions * update core backend cicd to build from github actions * fix order of config in litellm * quote env vars * add docker push statements * fix docker push statement * fix secrets typo * fix quotes * fix secrets outputs * delete backend cloudbuild * delete unused docker compose
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.
Approved.
Have discussed V2 improvements w/ @suzinyou which we can flesh out in coming weeks!
Reviewer: @markbotterill
Estimate: 2 hours
Ticket
Fixes: https://idinsight.atlassian.net/browse/AAQ-583
Description
Goal
Deploy to GCP infra on push to main
Changes
.github/workflows/deploy_gcp_*.yaml
, triggered for each componentdocker run
and notdocker compose
.docker compose
!!docker compose
to VMURL
objectURL
object handles special characters automatically.%
in password -- this causes issues for alembic.Future Tasks (optional)
Turn infra into TerraformIn progress at [AAQ-613] Terraform for GCP production infra #272How has this been tested?
To-do before merge (optional)
Checklist
Fill with
x
for completed.(Delete any items below that are not relevant)
.github/workflows/
I have updated the Terraform codeFuture task