initial: inherit broken NimbusCloud platform environment #1
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
| # NimbusCloud Platform — GitHub Actions CI/CD Pipeline | |
| # ⚠️ BROKEN — multiple issues preventing successful deployment | |
| # Last modified: 2026-04-20 (Jordan Reeves) | |
| # Status: FAILING — see most recent run for error details | |
| # | |
| # KNOWN ISSUES (candidate must fix all): | |
| # 1. Missing secret: DOCKER_PASSWORD not configured in repo settings | |
| # 2. Wrong ECR registry path: references old registry nimbuscloud-ecr-old | |
| # 3. No lint step — broken code can reach production | |
| # 4. No test step — no quality gate | |
| # 5. Deploy step references deleted Kubernetes context nimbuscloud-prod-old | |
| name: NimbusCloud Platform CI/CD | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| env: | |
| AWS_REGION: eu-west-2 | |
| # ⚠️ BUG: ECR registry path is wrong — old registry no longer exists | |
| ECR_REGISTRY: ${{ secrets.ECR_REGISTRY_OLD }} # ← WRONG — should be ECR_REGISTRY | |
| jobs: | |
| # ───────────────────────────────────────────── | |
| # ⚠️ MISSING: lint job — no code quality gate | |
| # Candidate must add an ESLint / flake8 / golint step | |
| # ───────────────────────────────────────────── | |
| # ───────────────────────────────────────────── | |
| # ⚠️ MISSING: test job — no automated tests run | |
| # Candidate must add npm test / pytest / go test step | |
| # ───────────────────────────────────────────── | |
| build: | |
| name: Build and Push Images | |
| runs-on: ubuntu-latest | |
| # ⚠️ Missing needs: [lint, test] — add when those jobs exist | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: ${{ env.AWS_REGION }} | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| # ⚠️ BUG: DOCKER_PASSWORD secret is not configured in repository settings | |
| # Pipeline fails here with: Error: Username and password required | |
| password: ${{ secrets.DOCKER_PASSWORD }} # ← SECRET NOT CONFIGURED | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and push booking-api | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: ./services/booking-api | |
| push: ${{ github.event_name != 'pull_request' }} | |
| # ⚠️ BUG: ECR_REGISTRY_OLD is wrong variable name | |
| tags: ${{ env.ECR_REGISTRY }}/booking-api:${{ github.sha }},${{ env.ECR_REGISTRY }}/booking-api:latest | |
| - name: Build and push payment-api | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: ./services/payment-api | |
| push: ${{ github.event_name != 'pull_request' }} | |
| tags: ${{ env.ECR_REGISTRY }}/payment-api:${{ github.sha }},${{ env.ECR_REGISTRY }}/payment-api:latest | |
| - name: Build and push auth-service | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: ./services/auth-service | |
| push: ${{ github.event_name != 'pull_request' }} | |
| tags: ${{ env.ECR_REGISTRY }}/auth-service:${{ github.sha }},${{ env.ECR_REGISTRY }}/auth-service:latest | |
| - name: Build and push notification-service | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: ./services/notification-service | |
| push: ${{ github.event_name != 'pull_request' }} | |
| tags: ${{ env.ECR_REGISTRY }}/notification-service:${{ github.sha }},${{ env.ECR_REGISTRY }}/notification-service:latest | |
| deploy: | |
| name: Deploy to Kubernetes | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: ${{ env.AWS_REGION }} | |
| - name: Set up kubectl | |
| uses: azure/setup-kubectl@v3 | |
| with: | |
| version: 'v1.28.0' | |
| - name: Update kubeconfig | |
| run: | | |
| # ⚠️ BUG: cluster name nimbuscloud-prod-old no longer exists | |
| # Should be: nimbuscloud-platform-cluster | |
| aws eks update-kubeconfig \ | |
| --region ${{ env.AWS_REGION }} \ | |
| --name nimbuscloud-prod-old # ← WRONG cluster name | |
| - name: Deploy to Kubernetes | |
| run: | | |
| kubectl set image deployment/booking-api \ | |
| booking-api=${{ env.ECR_REGISTRY }}/booking-api:${{ github.sha }} | |
| kubectl set image deployment/payment-api \ | |
| payment-api=${{ env.ECR_REGISTRY }}/payment-api:${{ github.sha }} | |
| kubectl set image deployment/auth-service \ | |
| auth-service=${{ env.ECR_REGISTRY }}/auth-service:${{ github.sha }} | |
| kubectl set image deployment/notification-service \ | |
| notification-service=${{ env.ECR_REGISTRY }}/notification-service:${{ github.sha }} | |
| - name: Verify deployment | |
| run: | | |
| kubectl rollout status deployment/booking-api --timeout=120s | |
| kubectl rollout status deployment/payment-api --timeout=120s | |
| kubectl rollout status deployment/auth-service --timeout=120s | |
| kubectl rollout status deployment/notification-service --timeout=120s |