fix: add db connection details to celery deployments #134
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Testing OpenConceptLab Deployment | |
on: [push] | |
env: | |
GKE_ZONE: ${{ secrets.GKE_ZONE }} | |
GKE_PROJECT: ${{ secrets.GKE_PROJECT }} | |
CLUSTER_NAME: ${{ secrets.CLUSTER_NAME }} | |
NAMESPACE: ${{ secrets.NAMESPACE }} | |
APP_REPLICA_COUNT: ${{ secrets.APP_REPLICA_COUNT }} | |
PORT: ${{ secrets.PORT }} | |
GOOGLE_CLOUD_PROJECT: ${{ secrets.GOOGLE_CLOUD_PROJECT }} | |
APP_DOMAIN: ${{ secrets.APP_DOMAIN }} | |
APP_NAME: ${{ secrets.APP_NAME }} | |
REDIS_HOST: ${{ secrets.REDIS_HOST }} | |
REDIS_PORT: ${{ secrets.REDIS_PORT }} | |
API_HOST: ${{ secrets.API_HOST }} | |
DB_HOST: ${{ secrets.DB_HOST }} | |
DB_PORT: ${{ secrets.DB_PORT }} | |
DB_PASSWORD: ${{ secrets.DB_PASSWORD }} | |
DB: ${{ secrets.DB }} | |
ES_HOSTS: ${{ secrets.ES_HOSTS }} | |
ES_USER: ${{ secrets.ES_USER }} | |
ES_PASSWORD: ${{ secrets.ES_PASSWORD }} | |
ES_PORT: ${{ secrets.ES_PORT }} | |
ENVIRONMENT: ${{ secrets.ENVIRONMENT }} | |
DEBUG: ${{ secrets.DEBUG }} | |
SECRET_KEY: ${{ secrets.SECRET_KEY }} | |
SENTRY_DSN_KEY: ${{ secrets.SENTRY_DSN_KEY }} | |
API_SUPERUSER_PASSWORD: ${{ secrets.API_SUPERUSER_PASSWORD }} | |
API_SUPERUSER_TOKEN: ${{ secrets.API_SUPERUSER_TOKEN }} | |
API_BASE_URL: ${{ secrets.API_BASE_URL }} | |
API_INTERNAL_BASE_URL: ${{ secrets.API_INTERNAL_BASE_URL }} | |
EMAIL_NOREPLY_PASSWORD: ${{ secrets.EMAIL_NOREPLY_PASSWORD }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_STORAGE_BUCKET_NAME: ${{ secrets.AWS_STORAGE_BUCKET_NAME }} | |
AWS_REGION_NAME: ${{ secrets.AWS_REGION_NAME }} | |
DB_INSTANCE_NAME: ${{ secrets.DB_INSTANCE_NAME }} | |
BACKEND_PORT: ${{ secrets.BACKEND_PORT }} | |
BACKEND_APP_DOMAIN: ${{ secrets.BACKEND_APP_DOMAIN }} | |
FLOWER_USER: ${{ secrets.FLOWER_USER }} | |
FLOWER_PASSWORD: ${{ secrets.FLOWER_PASSWORD }} | |
FLOWER_HOST: ${{ secrets.FLOWER_HOST }} | |
FLOWER_PORT: ${{ secrets.FLOWER_PORT }} | |
jobs: | |
deploy_to_testing: | |
name: Deploy testing server to google kubernetes engine | |
if: ${{ github.ref == 'refs/heads/celery-fixes'}} | |
runs-on: ubuntu-latest | |
environment: | |
name: test | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- id: "auth" | |
uses: "google-github-actions/auth@v0" | |
with: | |
credentials_json: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} | |
project_id: ${{ secrets.GOOGLE_CLOUD_PROJECT }} | |
- name: Install Helm | |
run: | | |
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash | |
- uses: google-github-actions/get-gke-credentials@fb08709ba27618c31c09e014e1d8364b02e5042e | |
with: | |
cluster_name: ${{ env.CLUSTER_NAME }} | |
location: ${{ env.GKE_ZONE }} | |
credentials: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} | |
- name: Deploy to Google Kubernetes engine | |
shell: bash | |
run: cd deploy/ && cat deploy.sh && sh deploy.sh |