Update CI tests to use document management endpoints #198
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: Build and Validation | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches-ignore: [main] | |
| jobs: | |
| build-validation: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| env: | |
| COMMIT_SHA: ${{ github.sha }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GITHUB_ACTOR: ${{ github.actor }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Ansible | |
| run: sudo apt-get update && sudo apt-get install -y ansible | |
| - name: Validate Docker Compose config with Ansible | |
| env: | |
| IMAGE_TAG: dummy | |
| OPEN_WEBUI_API_KEY_CHAT: dummy_key | |
| OPEN_WEBUI_API_KEY_GEN: dummy_key | |
| LANGSMITH_API_KEY: dummy_key | |
| run: ansible-playbook ansible/validate-compose.yml | |
| - name: Build auth-service (validation only) | |
| run: | | |
| docker build --platform linux/amd64 -t ghcr.io/aet-devops25/team-3/auth-service:${COMMIT_SHA} ./server/auth-service | |
| echo "✅ Auth Service build successful" | |
| - name: Build document-service (validation only) | |
| run: | | |
| docker build --platform linux/amd64 -t ghcr.io/aet-devops25/team-3/document-service:${COMMIT_SHA} ./server/document-service | |
| echo "✅ Document Service build successful" | |
| - name: Build genai-service (validation only) | |
| run: | | |
| docker build --platform linux/amd64 -t ghcr.io/aet-devops25/team-3/genai-service:${COMMIT_SHA} ./server/genai-service | |
| echo "✅ GenAI Service build successful" | |
| - name: Build eureka-server (validation only) | |
| run: | | |
| docker build --platform linux/amd64 -t ghcr.io/aet-devops25/team-3/eureka-server:${COMMIT_SHA} ./server/eureka-server | |
| echo "✅ Eureka Server build successful" | |
| - name: Build client (validation only) | |
| run: | | |
| # Build for validation without specific API URL | |
| docker build --platform linux/amd64 -t ghcr.io/aet-devops25/team-3/client:validation-${COMMIT_SHA} ./client | |
| echo "✅ Client build successful" | |
| - name: Build genai (validation only) | |
| run: | | |
| docker build --platform linux/amd64 -t ghcr.io/aet-devops25/team-3/genai:${COMMIT_SHA} ./genAi | |
| echo "✅ GenAI build successful" | |
| - name: Validation Summary | |
| run: | | |
| echo "🎉 All Docker images built successfully using multi-stage builds!" | |
| echo "Microservices (auth, document, genai-service, eureka) + client + genAI all validated!" | |
| echo "This was a validation build - no images were pushed to registry." | |
| echo "Images will be built and pushed when merged to main branch." |