From e10999ae34a9c1c1947c19ad2681f4e6ab5cf719 Mon Sep 17 00:00:00 2001 From: Arjun Vijay Date: Fri, 29 May 2026 10:51:51 -0400 Subject: [PATCH 1/3] Remove Help Sidebar option --- src/components/Sidebar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index b75f7cde..31b69021 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -31,7 +31,7 @@ const navItems: t.NavItem[] = [ capability: [SystemCapabilities.READ_ROLES, SystemCapabilities.READ_GROUPS], }, { labelKey: 'com_nav_grants', path: '/grants', icon: 'lock' }, - { labelKey: 'com_nav_help', path: '/help', icon: 'question' }, + // { labelKey: 'com_nav_help', path: '/help', icon: 'question' }, ]; function getUserInitials(user?: { name?: string; email?: string } | null): string { From 84c2dfcc667b50031f1399c917f21ba83f27920b Mon Sep 17 00:00:00 2001 From: Arjun Vijay Date: Fri, 29 May 2026 11:12:33 -0400 Subject: [PATCH 2/3] Seperate build/deploy pipelines --- .github/workflows/build.yaml | 78 ++++++++++++++++++++++++++++++++ .github/workflows/deploy.yaml | 84 +++-------------------------------- 2 files changed, 84 insertions(+), 78 deletions(-) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 00000000..b379eeb3 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,78 @@ +name: Build & Push to ECR + +on: + push: + branches: + - main + paths: + - 'src/**' + - 'server.ts' + - 'package.json' + - 'bun.lock' + - 'Dockerfile' + - '.github/workflows/build.yaml' + +permissions: + id-token: write + contents: read + +run-name: Build Admin Panel @ ${{ github.sha }} + +jobs: + test: + name: Lint, Type Check & Tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - uses: oven-sh/setup-bun@v2 + + - name: Install dependencies + run: bun install --frozen-lockfile + + - name: ESLint + run: bunx eslint src/ --max-warnings 0 + + - name: TypeScript + run: bunx tsc --noEmit + + - name: Vitest + run: bun run test + env: + NODE_ENV: development + SESSION_SECRET: ci-test-secret-do-not-use-in-production + + build-and-push: + name: Build & Push to ECR + runs-on: ubuntu-latest + needs: test + steps: + - uses: actions/checkout@v6 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Assume IAM role + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ secrets.SAAS_AWS_DEPLOY_ROLE_ARN }} + role-session-name: deployment-role-session + aws-region: us-east-1 + + - name: Login to Amazon ECR + id: login-ecr + uses: aws-actions/amazon-ecr-login@v2 + with: + registries: "897729109735" + + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: . + file: ./Dockerfile + platforms: linux/amd64 + push: true + tags: | + ${{ steps.login-ecr.outputs.registry }}/jarvis/admin-panel:${{ github.sha }} + ${{ steps.login-ecr.outputs.registry }}/jarvis/admin-panel:latest + provenance: false diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 4e097735..3fb48e73 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -1,16 +1,6 @@ name: Deploy Admin Panel on: - push: - branches: - - main - paths: - - 'src/**' - - 'server.ts' - - 'package.json' - - 'bun.lock' - - 'Dockerfile' - - '.github/workflows/deploy.yaml' workflow_dispatch: inputs: application: @@ -27,6 +17,11 @@ on: type: string required: true default: us-east-1 + image_tag: + description: 'Image tag to deploy (defaults to latest)' + type: string + required: false + default: latest permissions: id-token: write @@ -35,76 +30,9 @@ permissions: run-name: Deploy Admin Panel for ${{ inputs.application }} jobs: - test: - name: Lint, Type Check & Tests - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - - uses: oven-sh/setup-bun@v2 - - - name: Install dependencies - run: bun install --frozen-lockfile - - - name: ESLint - run: bunx eslint src/ --max-warnings 0 - - - name: TypeScript - run: bunx tsc --noEmit - - - name: Vitest - run: bun run test - env: - NODE_ENV: development - SESSION_SECRET: ci-test-secret-do-not-use-in-production - - build-and-push: - name: Build & Push to ECR - runs-on: ubuntu-latest - needs: test - outputs: - image: ${{ steps.tags.outputs.ecr_image }} - steps: - - uses: actions/checkout@v6 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Assume IAM role - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: ${{ secrets.SAAS_AWS_DEPLOY_ROLE_ARN }} - role-session-name: deployment-role-session - aws-region: ${{ inputs.region || 'us-east-1' }} - - - name: Login to Amazon ECR - id: login-ecr - uses: aws-actions/amazon-ecr-login@v2 - with: - registries: "897729109735" - - - name: Determine image tags - id: tags - run: | - ECR_IMAGE="${{ steps.login-ecr.outputs.registry }}/jarvis/admin-panel" - echo "ecr_image=${ECR_IMAGE}:${{ github.sha }}" >> $GITHUB_OUTPUT - echo "tags=${ECR_IMAGE}:${{ github.sha }},${ECR_IMAGE}:latest" >> $GITHUB_OUTPUT - - - name: Build and push - uses: docker/build-push-action@v6 - with: - context: . - file: ./Dockerfile - platforms: linux/amd64 - push: true - tags: ${{ steps.tags.outputs.tags }} - provenance: false - deploy: name: Deploy to EKS runs-on: ubuntu-latest - needs: build-and-push - if: github.event_name == 'workflow_dispatch' env: DEPLOYMENT_NAME: jarvis-admin-panel steps: @@ -145,7 +73,7 @@ jobs: - name: Update image on EKS run: | kubectl set image deploy/${{ env.DEPLOYMENT_NAME }} \ - jarvis-admin-panel=${{ needs.build-and-push.outputs.image }} \ + jarvis-admin-panel=${{ steps.login-ecr.outputs.registry }}/jarvis/admin-panel:${{ inputs.image_tag }} \ -n ${{ inputs.application }} - name: Restart pods From e52ca38512a868d7f6f393a4c5fec06fb37559a9 Mon Sep 17 00:00:00 2001 From: Arjun Vijay Date: Fri, 29 May 2026 13:23:57 -0400 Subject: [PATCH 3/3] Address copilot comments; Replace push trigger with workflow dispatch --- .github/workflows/build.yaml | 78 ----------------------------------- .github/workflows/deploy.yaml | 72 ++++++++++++++++++++++++++++---- 2 files changed, 65 insertions(+), 85 deletions(-) delete mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml deleted file mode 100644 index b379eeb3..00000000 --- a/.github/workflows/build.yaml +++ /dev/null @@ -1,78 +0,0 @@ -name: Build & Push to ECR - -on: - push: - branches: - - main - paths: - - 'src/**' - - 'server.ts' - - 'package.json' - - 'bun.lock' - - 'Dockerfile' - - '.github/workflows/build.yaml' - -permissions: - id-token: write - contents: read - -run-name: Build Admin Panel @ ${{ github.sha }} - -jobs: - test: - name: Lint, Type Check & Tests - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - - uses: oven-sh/setup-bun@v2 - - - name: Install dependencies - run: bun install --frozen-lockfile - - - name: ESLint - run: bunx eslint src/ --max-warnings 0 - - - name: TypeScript - run: bunx tsc --noEmit - - - name: Vitest - run: bun run test - env: - NODE_ENV: development - SESSION_SECRET: ci-test-secret-do-not-use-in-production - - build-and-push: - name: Build & Push to ECR - runs-on: ubuntu-latest - needs: test - steps: - - uses: actions/checkout@v6 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Assume IAM role - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: ${{ secrets.SAAS_AWS_DEPLOY_ROLE_ARN }} - role-session-name: deployment-role-session - aws-region: us-east-1 - - - name: Login to Amazon ECR - id: login-ecr - uses: aws-actions/amazon-ecr-login@v2 - with: - registries: "897729109735" - - - name: Build and push - uses: docker/build-push-action@v6 - with: - context: . - file: ./Dockerfile - platforms: linux/amd64 - push: true - tags: | - ${{ steps.login-ecr.outputs.registry }}/jarvis/admin-panel:${{ github.sha }} - ${{ steps.login-ecr.outputs.registry }}/jarvis/admin-panel:latest - provenance: false diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 3fb48e73..de598752 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -14,14 +14,11 @@ on: - jarvis-demo region: description: 'AWS Region to deploy to' - type: string + type: choice required: true default: us-east-1 - image_tag: - description: 'Image tag to deploy (defaults to latest)' - type: string - required: false - default: latest + options: + - us-east-1 permissions: id-token: write @@ -30,9 +27,68 @@ permissions: run-name: Deploy Admin Panel for ${{ inputs.application }} jobs: + test: + name: Lint, Type Check & Tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - uses: oven-sh/setup-bun@v2 + + - name: Install dependencies + run: bun install --frozen-lockfile + + - name: ESLint + run: bunx eslint src/ --max-warnings 0 + + - name: TypeScript + run: bunx tsc --noEmit + + - name: Vitest + run: bun run test + env: + NODE_ENV: development + SESSION_SECRET: ci-test-secret-do-not-use-in-production + + build-and-push: + name: Build & Push to ECR + runs-on: ubuntu-latest + needs: test + steps: + - uses: actions/checkout@v6 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Assume IAM role + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ secrets.SAAS_AWS_DEPLOY_ROLE_ARN }} + role-session-name: deployment-role-session + aws-region: ${{ inputs.region }} + + - name: Login to Amazon ECR + id: login-ecr + uses: aws-actions/amazon-ecr-login@v2 + with: + registries: "897729109735" + + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: . + file: ./Dockerfile + platforms: linux/amd64 + push: true + tags: | + ${{ steps.login-ecr.outputs.registry }}/jarvis/admin-panel:${{ github.sha }} + ${{ steps.login-ecr.outputs.registry }}/jarvis/admin-panel:latest + provenance: false + deploy: name: Deploy to EKS runs-on: ubuntu-latest + needs: build-and-push env: DEPLOYMENT_NAME: jarvis-admin-panel steps: @@ -71,9 +127,11 @@ jobs: run: aws eks update-kubeconfig --name ${{ steps.config.outputs.eks_cluster_name }} --region ${{ inputs.region }} - name: Update image on EKS + env: + admin_panel_image: ${{ steps.login-ecr.outputs.registry }}/jarvis/admin-panel:${{ github.sha }} run: | kubectl set image deploy/${{ env.DEPLOYMENT_NAME }} \ - jarvis-admin-panel=${{ steps.login-ecr.outputs.registry }}/jarvis/admin-panel:${{ inputs.image_tag }} \ + jarvis-admin-panel=$admin_panel_image \ -n ${{ inputs.application }} - name: Restart pods