diff --git a/.github/workflows/build-demo-app-video.yml b/.github/workflows/build-demo-app-video.yml new file mode 100644 index 000000000..b6826322b --- /dev/null +++ b/.github/workflows/build-demo-app-video.yml @@ -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 diff --git a/.github/workflows/deploy-demo-app-video.yml b/.github/workflows/deploy-demo-app-video.yml new file mode 100644 index 000000000..f34beee69 --- /dev/null +++ b/.github/workflows/deploy-demo-app-video.yml @@ -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/upload-artifact@v4.3.1 + 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/auth@v2.1.2 + with: + credentials_json: "${{ secrets.GKE_SA_KEY }}" + - name: ๐Ÿ” Obtaining GKE credentials + uses: google-github-actions/get-gke-credentials@v2.1.0 + with: + cluster_name: ${{ secrets.GKE_CLUSTER }} + location: ${{ secrets.GKE_ZONE }} + project_id: ${{ secrets.GKE_PROJECT }} + - name: ๐Ÿ“ฆ Downloading the artifact + uses: actions/download-artifact@v4.1.4 + 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/ diff --git a/apps/demo-app-video/.env-cmdrc.json b/apps/demo-app-video/.env-cmdrc.json index 0bd73dd99..83bc50d45 100644 --- a/apps/demo-app-video/.env-cmdrc.json +++ b/apps/demo-app-video/.env-cmdrc.json @@ -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" } } diff --git a/apps/demo-app-video/src/local-config.json b/apps/demo-app-video/src/local-config.json index c3bd25b68..70228dee8 100644 --- a/apps/demo-app-video/src/local-config.json +++ b/apps/demo-app-video/src/local-config.json @@ -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",