Skip to content

Commit

Permalink
Created pipelines and build configs
Browse files Browse the repository at this point in the history
  • Loading branch information
souyahia-monk committed Jan 2, 2025
1 parent 39ee0aa commit acb211a
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 23 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/build-demo-app-video.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build Demo App Video
run-name: Build Demo App Video On Pull Request

on:
pull_request:
branches: [main]

jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

steps:
- name: 💾 Checking out the repository
uses: actions/checkout@v4
- name: ⚙️ Setting up the MonkJs project
uses: ./.github/actions/monkjs-set-up
with:
build-env: production
- name: 📱 Building the demo app video
run: cd apps/demo-app-video && yarn build:staging
62 changes: 62 additions & 0 deletions .github/workflows/deploy-demo-app-video.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Deploy Demo App Video
run-name: Deploy Demo App Video To Staging After Merge

on:
push:
branches: [ main ]

jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

steps:
- name: 💾 Checking out the repository
uses: actions/checkout@v4
- name: ⚙️ Setting up the MonkJs project
uses: ./.github/actions/monkjs-set-up
with:
build-env: production
- name: 📱 Building the demo app video
run: cd apps/demo-app-video && yarn build:staging
- name: 📦 Uploading the artifact
uses: actions/[email protected]
with:
name: build-demo-app-video-staging
path: apps/demo-app-video/build
if-no-files-found: error

deploy:
name: Deploy
environment: staging
needs:
- build
container:
image: dtzar/helm-kubectl:3.14.2
runs-on: ubuntu-latest
steps:
- name: 🔐 Authenticating to Google Cloud
uses: google-github-actions/[email protected]
with:
credentials_json: "${{ secrets.GKE_SA_KEY }}"
- name: 🔐 Obtaining GKE credentials
uses: google-github-actions/[email protected]
with:
cluster_name: ${{ secrets.GKE_CLUSTER }}
location: ${{ secrets.GKE_ZONE }}
project_id: ${{ secrets.GKE_PROJECT }}
- name: 📦 Downloading the artifact
uses: actions/[email protected]
with:
name: build-demo-app-video-staging
path: demo-video
- name: 🧹 Cleaning up previous build
run: |-
kubectl -n poc exec -it $(kubectl get pods -n poc -l app.kubernetes.io/instance=poc-spa --no-headers | awk '{print $1}') -- rm -rf demo-video
- name: 🌐 Deploying app
run: |-
kubectl -n poc cp demo-video poc/$(kubectl get pods -n poc -l app.kubernetes.io/instance=poc-spa --no-headers | awk '{print $1}'):/app/
39 changes: 17 additions & 22 deletions apps/demo-app-video/.env-cmdrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,49 +4,44 @@
"HTTPS": "true",
"ESLINT_NO_DEV_ERRORS": "true",
"REACT_APP_ENVIRONMENT": "local",
"REACT_APP_LIVE_CONFIG_ID": "demo-app-development",
"REACT_APP_LIVE_CONFIG_ID": "demo-app-video-development",
"REACT_APP_USE_LOCAL_CONFIG": "true",
"REACT_APP_AUTH_DOMAIN": "idp.staging.monk.ai",
"REACT_APP_AUTH_DOMAIN": "idp.preview.monk.ai",
"REACT_APP_AUTH_AUDIENCE": "https://api.monk.ai/v1/",
"REACT_APP_AUTH_CLIENT_ID": "DAeZWqeeOfgItYBcQzFeFwSrlvmUdN7L",
"REACT_APP_SENTRY_DSN": "https://74f50bfe6f11de7aefd54acfa5dfed96@o4505669501648896.ingest.us.sentry.io/4506863461662720",
"REACT_APP_SENTRY_DEBUG": "true",
"REACT_APP_INSPECTION_REPORT_URL": "https://demo-capture.preview.monk.ai"
"REACT_APP_AUTH_CLIENT_ID": "w9MTl518yqWl0dVE8oUbkxc3gnrI0sgH",
"REACT_APP_SENTRY_DSN": "https://e0644a77095a58eeab6b0e32cc9d4188@o4505669501648896.ingest.us.sentry.io/4508575240290304",
"REACT_APP_SENTRY_DEBUG": "true"
},
"development": {
"REACT_APP_ENVIRONMENT": "development",
"REACT_APP_LIVE_CONFIG_ID": "demo-app-development",
"REACT_APP_LIVE_CONFIG_ID": "demo-app-video-development",
"REACT_APP_AUTH_DOMAIN": "idp.preview.monk.ai",
"REACT_APP_AUTH_AUDIENCE": "https://api.monk.ai/v1/",
"REACT_APP_AUTH_CLIENT_ID": "O7geYcPM6zEJrHw0WvQVzSIzw4WzrAtH",
"REACT_APP_SENTRY_DSN": "https://74f50bfe6f11de7aefd54acfa5dfed96@o4505669501648896.ingest.us.sentry.io/4506863461662720",
"REACT_APP_INSPECTION_REPORT_URL": "https://demo-capture.preview.monk.ai"
"REACT_APP_AUTH_CLIENT_ID": "w9MTl518yqWl0dVE8oUbkxc3gnrI0sgH",
"REACT_APP_SENTRY_DSN": "https://e0644a77095a58eeab6b0e32cc9d4188@o4505669501648896.ingest.us.sentry.io/4508575240290304"
},
"staging": {
"REACT_APP_ENVIRONMENT": "staging",
"REACT_APP_LIVE_CONFIG_ID": "demo-app-staging",
"REACT_APP_LIVE_CONFIG_ID": "demo-app-video-staging",
"REACT_APP_AUTH_DOMAIN": "idp.preview.monk.ai",
"REACT_APP_AUTH_AUDIENCE": "https://api.monk.ai/v1/",
"REACT_APP_AUTH_CLIENT_ID": "O7geYcPM6zEJrHw0WvQVzSIzw4WzrAtH",
"REACT_APP_SENTRY_DSN": "https://74f50bfe6f11de7aefd54acfa5dfed96@o4505669501648896.ingest.us.sentry.io/4506863461662720",
"REACT_APP_INSPECTION_REPORT_URL": "https://demo-capture.preview.monk.ai"
"REACT_APP_AUTH_CLIENT_ID": "w9MTl518yqWl0dVE8oUbkxc3gnrI0sgH",
"REACT_APP_SENTRY_DSN": "https://e0644a77095a58eeab6b0e32cc9d4188@o4505669501648896.ingest.us.sentry.io/4508575240290304"
},
"preview": {
"REACT_APP_ENVIRONMENT": "preview",
"REACT_APP_LIVE_CONFIG_ID": "demo-app-preview",
"REACT_APP_LIVE_CONFIG_ID": "demo-app-video-preview",
"REACT_APP_AUTH_DOMAIN": "idp.preview.monk.ai",
"REACT_APP_AUTH_AUDIENCE": "https://api.monk.ai/v1/",
"REACT_APP_AUTH_CLIENT_ID": "O7geYcPM6zEJrHw0WvQVzSIzw4WzrAtH",
"REACT_APP_SENTRY_DSN": "https://74f50bfe6f11de7aefd54acfa5dfed96@o4505669501648896.ingest.us.sentry.io/4506863461662720",
"REACT_APP_INSPECTION_REPORT_URL": "https://demo-capture.preview.monk.ai"
"REACT_APP_AUTH_CLIENT_ID": "w9MTl518yqWl0dVE8oUbkxc3gnrI0sgH",
"REACT_APP_SENTRY_DSN": "https://e0644a77095a58eeab6b0e32cc9d4188@o4505669501648896.ingest.us.sentry.io/4508575240290304"
},
"backend-staging-qa": {
"REACT_APP_ENVIRONMENT": "backend-staging-qa",
"REACT_APP_LIVE_CONFIG_ID": "demo-app-backend-staging-qa",
"REACT_APP_LIVE_CONFIG_ID": "demo-app-video-backend-staging-qa",
"REACT_APP_AUTH_DOMAIN": "idp.staging.monk.ai",
"REACT_APP_AUTH_AUDIENCE": "https://api.monk.ai/v1/",
"REACT_APP_AUTH_CLIENT_ID": "DAeZWqeeOfgItYBcQzFeFwSrlvmUdN7L",
"REACT_APP_SENTRY_DSN": "https://74f50bfe6f11de7aefd54acfa5dfed96@o4505669501648896.ingest.us.sentry.io/4506863461662720",
"REACT_APP_INSPECTION_REPORT_URL": "https://demo-capture.staging.monk.ai"
"REACT_APP_AUTH_CLIENT_ID": "PLGfABs0AWNwZaokEg3GeU4m01RhIvyi",
"REACT_APP_SENTRY_DSN": "https://e0644a77095a58eeab6b0e32cc9d4188@o4505669501648896.ingest.us.sentry.io/4508575240290304"
}
}
2 changes: 1 addition & 1 deletion apps/demo-app-video/src/local-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"tasks": ["damage_detection"],
"isVideoCapture": true
},
"apiDomain": "api.staging.monk.ai/v1",
"apiDomain": "api.preview.monk.ai/v1",
"thumbnailDomain": "europe-west1-monk-preview-321715.cloudfunctions.net/image_resize",
"startTasksOnComplete": true,
"enforceOrientation": "portrait",
Expand Down

0 comments on commit acb211a

Please sign in to comment.