Merge pull request #77 from akvo/feature/76-update-registered-app-imp… #63
This file contains hidden or 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: Deploy to Test Cluster | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - initial-deployment | |
| concurrency: | |
| group: test | |
| cancel-in-progress: false | |
| jobs: | |
| build-push: | |
| name: Build and Push to Registry | |
| runs-on: ubuntu-latest | |
| environment: Test | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| path: src | |
| - name: Checkout Akvo composite actions | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: akvo/composite-actions | |
| token: ${{ secrets.GH_PAT }} | |
| path: composite-actions | |
| ref: 0.0.9 | |
| - name: Docker Build Nginx | |
| uses: ./composite-actions/.github/actions/docker-build | |
| with: | |
| app-name: "akvo-rag" | |
| service-name: "nginx" | |
| dockerfile-location: "nginx" | |
| cluster-name: "test" | |
| - name: Docker Build Frontend | |
| uses: ./composite-actions/.github/actions/docker-build | |
| with: | |
| app-name: "akvo-rag" | |
| service-name: "frontend" | |
| dockerfile-location: "frontend" | |
| cluster-name: "test" | |
| - name: Docker Build Backend | |
| uses: ./composite-actions/.github/actions/docker-build | |
| with: | |
| app-name: "akvo-rag" | |
| service-name: "backend" | |
| dockerfile-location: "backend" | |
| cluster-name: "test" | |
| - name: Docker Build Celery Worker | |
| uses: ./composite-actions/.github/actions/docker-build | |
| with: | |
| app-name: "akvo-rag" | |
| service-name: "celery-worker" | |
| dockerfile-location: "backend/Dockerfile.celery" | |
| cluster-name: "test" | |
| - name: Docker Build Script | |
| uses: ./composite-actions/.github/actions/docker-build | |
| with: | |
| app-name: "akvo-rag" | |
| service-name: "script" | |
| dockerfile-location: "script" | |
| cluster-name: "test" | |
| - name: Docker Push Nginx | |
| uses: ./composite-actions/.github/actions/docker-push | |
| with: | |
| app-name: "akvo-rag" | |
| service-name: "nginx" | |
| gcloud-sa: ${{ secrets.GCLOUD_SERVICE_ACCOUNT_REGISTRY }} | |
| cluster-name: "test" | |
| - name: Docker Push Frontend | |
| uses: ./composite-actions/.github/actions/docker-push | |
| with: | |
| app-name: "akvo-rag" | |
| service-name: "frontend" | |
| gcloud-sa: ${{ secrets.GCLOUD_SERVICE_ACCOUNT_REGISTRY }} | |
| cluster-name: "test" | |
| - name: Docker Push Celery Worker | |
| uses: ./composite-actions/.github/actions/docker-push | |
| with: | |
| app-name: "akvo-rag" | |
| service-name: "celery-worker" | |
| gcloud-sa: ${{ secrets.GCLOUD_SERVICE_ACCOUNT_REGISTRY }} | |
| cluster-name: "test" | |
| - name: Docker Push Backend | |
| uses: ./composite-actions/.github/actions/docker-push | |
| with: | |
| app-name: "akvo-rag" | |
| service-name: "backend" | |
| gcloud-sa: ${{ secrets.GCLOUD_SERVICE_ACCOUNT_REGISTRY }} | |
| cluster-name: "test" | |
| - name: Docker Push Script | |
| uses: ./composite-actions/.github/actions/docker-push | |
| with: | |
| app-name: "akvo-rag" | |
| service-name: "script" | |
| gcloud-sa: ${{ secrets.GCLOUD_SERVICE_ACCOUNT_REGISTRY }} | |
| cluster-name: "test" | |
| rollout-main-akvo-rag: | |
| name: Rollout to main Akvo RAG server | |
| needs: build-push | |
| runs-on: ubuntu-latest | |
| environment: Test | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| path: src | |
| - name: Checkout Akvo composite actions | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: akvo/composite-actions | |
| token: ${{ secrets.GH_PAT }} | |
| path: composite-actions | |
| ref: 0.0.9 | |
| - name: Rollout Nginx | |
| uses: ./composite-actions/.github/actions/k8s-rollout | |
| with: | |
| app-name: "akvo-rag" | |
| deployment-name: "nginx-deployment" | |
| container-name: "nginx" | |
| cluster-name: "test" | |
| namespace-name: "akvo-rag-namespace" | |
| gcloud-sa: ${{ secrets.GCLOUD_SERVICE_ACCOUNT_K8S }} | |
| - name: Rollout Frontend | |
| uses: ./composite-actions/.github/actions/k8s-rollout | |
| with: | |
| app-name: "akvo-rag" | |
| deployment-name: "frontend-deployment" | |
| container-name: "frontend" | |
| cluster-name: "test" | |
| namespace-name: "akvo-rag-namespace" | |
| gcloud-sa: ${{ secrets.GCLOUD_SERVICE_ACCOUNT_K8S }} | |
| - name: Rollout Backend | |
| uses: ./composite-actions/.github/actions/k8s-rollout | |
| with: | |
| app-name: "akvo-rag" | |
| deployment-name: "backend-deployment" | |
| container-name: "backend" | |
| cluster-name: "test" | |
| namespace-name: "akvo-rag-namespace" | |
| gcloud-sa: ${{ secrets.GCLOUD_SERVICE_ACCOUNT_K8S }} | |
| - name: Rollout Celery Worker | |
| uses: ./composite-actions/.github/actions/k8s-rollout | |
| with: | |
| app-name: "akvo-rag" | |
| deployment-name: "celery-worker-deployment" | |
| container-name: "celery-worker" | |
| cluster-name: "test" | |
| namespace-name: "akvo-rag-namespace" | |
| gcloud-sa: ${{ secrets.GCLOUD_SERVICE_ACCOUNT_K8S }} | |
| - name: Rollout Script | |
| uses: ./composite-actions/.github/actions/k8s-rollout | |
| with: | |
| app-name: "akvo-rag" | |
| deployment-name: "script-deployment" | |
| container-name: "script" | |
| cluster-name: "test" | |
| namespace-name: "akvo-rag-namespace" | |
| gcloud-sa: ${{ secrets.GCLOUD_SERVICE_ACCOUNT_K8S }} | |
| rollout-agriconnect-rag: | |
| name: Rollout to Agriconnect RAG server | |
| needs: build-push | |
| runs-on: ubuntu-latest | |
| environment: Test | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| path: src | |
| - name: Checkout Akvo composite actions | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: akvo/composite-actions | |
| token: ${{ secrets.GH_PAT }} | |
| path: composite-actions | |
| ref: 0.0.9 | |
| - name: Rollout Nginx | |
| uses: ./composite-actions/.github/actions/k8s-rollout | |
| with: | |
| app-name: "akvo-rag" | |
| deployment-name: "nginx-deployment" | |
| container-name: "nginx" | |
| cluster-name: "test" | |
| namespace-name: "agriconnect-rag-namespace" | |
| gcloud-sa: ${{ secrets.GCLOUD_SERVICE_ACCOUNT_K8S }} | |
| - name: Rollout Frontend | |
| uses: ./composite-actions/.github/actions/k8s-rollout | |
| with: | |
| app-name: "akvo-rag" | |
| deployment-name: "frontend-deployment" | |
| container-name: "frontend" | |
| cluster-name: "test" | |
| namespace-name: "agriconnect-rag-namespace" | |
| gcloud-sa: ${{ secrets.GCLOUD_SERVICE_ACCOUNT_K8S }} | |
| - name: Rollout Backend | |
| uses: ./composite-actions/.github/actions/k8s-rollout | |
| with: | |
| app-name: "akvo-rag" | |
| deployment-name: "backend-deployment" | |
| container-name: "backend" | |
| cluster-name: "test" | |
| namespace-name: "agriconnect-rag-namespace" | |
| gcloud-sa: ${{ secrets.GCLOUD_SERVICE_ACCOUNT_K8S }} | |
| - name: Rollout Celery Worker | |
| uses: ./composite-actions/.github/actions/k8s-rollout | |
| with: | |
| app-name: "akvo-rag" | |
| deployment-name: "celery-worker-deployment" | |
| container-name: "celery-worker" | |
| cluster-name: "test" | |
| namespace-name: "agriconnect-rag-namespace" | |
| gcloud-sa: ${{ secrets.GCLOUD_SERVICE_ACCOUNT_K8S }} | |
| - name: Rollout Script | |
| uses: ./composite-actions/.github/actions/k8s-rollout | |
| with: | |
| app-name: "akvo-rag" | |
| deployment-name: "script-deployment" | |
| container-name: "script" | |
| cluster-name: "test" | |
| namespace-name: "agriconnect-rag-namespace" | |
| gcloud-sa: ${{ secrets.GCLOUD_SERVICE_ACCOUNT_K8S }} |