Implement CI/CD pipeline setup and enhance frontend and API Docs scripts; update progress tracking and project structure documentation
Some checks failed
API Docs (Node.js Express) / test (18) (push) Failing after 22s
API Docs (Node.js Express) / test (20) (push) Failing after 22s
API Docs (Node.js Express) / build (push) Has been skipped
API Docs (Node.js Express) / security (push) Has been skipped
LabFusion CI/CD Pipeline / api-gateway (push) Failing after 4m53s
Docker Build and Push / build-and-push (push) Failing after 3m31s
Docker Build and Push / security-scan (push) Has been skipped
API Docs (Node.js Express) / test (16) (push) Failing after 3m7s
API Gateway (Java Spring Boot) / test (17) (push) Failing after 7m42s
API Gateway (Java Spring Boot) / test (21) (push) Failing after 5m11s
API Gateway (Java Spring Boot) / build (push) Has been skipped
API Gateway (Java Spring Boot) / security (push) Has been skipped
LabFusion CI/CD Pipeline / service-adapters (push) Failing after 6m30s
LabFusion CI/CD Pipeline / api-docs (push) Failing after 10s
LabFusion CI/CD Pipeline / frontend (push) Failing after 4m54s
LabFusion CI/CD Pipeline / integration-tests (push) Has been skipped
LabFusion CI/CD Pipeline / security-scan (push) Has been skipped
Frontend (React) / test (16) (push) Failing after 4m58s
Frontend (React) / test (18) (push) Failing after 4m58s
Frontend (React) / test (20) (push) Failing after 4m58s
Frontend (React) / build (push) Has been skipped
Frontend (React) / security (push) Has been skipped
Integration Tests / integration-tests (push) Failing after 35s
Integration Tests / performance-tests (push) Has been skipped
Service Adapters (Python FastAPI) / test (3.1) (push) Failing after 15s
Service Adapters (Python FastAPI) / test (3.11) (push) Failing after 5m23s
Service Adapters (Python FastAPI) / test (3.12) (push) Failing after 6m18s
Service Adapters (Python FastAPI) / test (3.9) (push) Failing after 6m18s
Docker Build and Push / deploy-staging (push) Has been skipped
Service Adapters (Python FastAPI) / build (push) Has been skipped
Service Adapters (Python FastAPI) / security (push) Has been skipped
Docker Build and Push / deploy-production (push) Has been skipped
Frontend (React) / lighthouse (push) Has been skipped
Some checks failed
API Docs (Node.js Express) / test (18) (push) Failing after 22s
API Docs (Node.js Express) / test (20) (push) Failing after 22s
API Docs (Node.js Express) / build (push) Has been skipped
API Docs (Node.js Express) / security (push) Has been skipped
LabFusion CI/CD Pipeline / api-gateway (push) Failing after 4m53s
Docker Build and Push / build-and-push (push) Failing after 3m31s
Docker Build and Push / security-scan (push) Has been skipped
API Docs (Node.js Express) / test (16) (push) Failing after 3m7s
API Gateway (Java Spring Boot) / test (17) (push) Failing after 7m42s
API Gateway (Java Spring Boot) / test (21) (push) Failing after 5m11s
API Gateway (Java Spring Boot) / build (push) Has been skipped
API Gateway (Java Spring Boot) / security (push) Has been skipped
LabFusion CI/CD Pipeline / service-adapters (push) Failing after 6m30s
LabFusion CI/CD Pipeline / api-docs (push) Failing after 10s
LabFusion CI/CD Pipeline / frontend (push) Failing after 4m54s
LabFusion CI/CD Pipeline / integration-tests (push) Has been skipped
LabFusion CI/CD Pipeline / security-scan (push) Has been skipped
Frontend (React) / test (16) (push) Failing after 4m58s
Frontend (React) / test (18) (push) Failing after 4m58s
Frontend (React) / test (20) (push) Failing after 4m58s
Frontend (React) / build (push) Has been skipped
Frontend (React) / security (push) Has been skipped
Integration Tests / integration-tests (push) Failing after 35s
Integration Tests / performance-tests (push) Has been skipped
Service Adapters (Python FastAPI) / test (3.1) (push) Failing after 15s
Service Adapters (Python FastAPI) / test (3.11) (push) Failing after 5m23s
Service Adapters (Python FastAPI) / test (3.12) (push) Failing after 6m18s
Service Adapters (Python FastAPI) / test (3.9) (push) Failing after 6m18s
Docker Build and Push / deploy-staging (push) Has been skipped
Service Adapters (Python FastAPI) / build (push) Has been skipped
Service Adapters (Python FastAPI) / security (push) Has been skipped
Docker Build and Push / deploy-production (push) Has been skipped
Frontend (React) / lighthouse (push) Has been skipped
This commit is contained in:
151
.gitea/workflows/docker-build.yml
Normal file
151
.gitea/workflows/docker-build.yml
Normal file
@@ -0,0 +1,151 @@
|
||||
name: Docker Build and Push
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, develop ]
|
||||
tags: [ 'v*' ]
|
||||
pull_request:
|
||||
branches: [ main, develop ]
|
||||
|
||||
env:
|
||||
REGISTRY: gitea.example.com
|
||||
IMAGE_PREFIX: labfusion
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Extract metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}/api-gateway
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}/service-adapters
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}/api-docs
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}/frontend
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=ref,event=pr
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=semver,pattern={{major}}
|
||||
type=sha,prefix={{branch}}-
|
||||
type=raw,value=latest,enable={{is_default_branch}}
|
||||
|
||||
- name: Build and push API Gateway
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./services/api-gateway
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}/api-gateway:${{ steps.meta.outputs.version }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha,scope=api-gateway
|
||||
cache-to: type=gha,mode=max,scope=api-gateway
|
||||
|
||||
- name: Build and push Service Adapters
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./services/service-adapters
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}/service-adapters:${{ steps.meta.outputs.version }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha,scope=service-adapters
|
||||
cache-to: type=gha,mode=max,scope=service-adapters
|
||||
|
||||
- name: Build and push API Docs
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./services/api-docs
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}/api-docs:${{ steps.meta.outputs.version }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha,scope=api-docs
|
||||
cache-to: type=gha,mode=max,scope=api-docs
|
||||
|
||||
- name: Build and push Frontend
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./frontend
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}/frontend:${{ steps.meta.outputs.version }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha,scope=frontend
|
||||
cache-to: type=gha,mode=max,scope=frontend
|
||||
|
||||
security-scan:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build-and-push
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Run Trivy vulnerability scanner
|
||||
uses: aquasecurity/trivy-action@master
|
||||
with:
|
||||
image-ref: |
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}/api-gateway:${{ github.sha }}
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}/service-adapters:${{ github.sha }}
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}/api-docs:${{ github.sha }}
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}/frontend:${{ github.sha }}
|
||||
format: 'sarif'
|
||||
output: 'trivy-results.sarif'
|
||||
|
||||
- name: Upload Trivy scan results
|
||||
uses: github/codeql-action/upload-sarif@v2
|
||||
if: always()
|
||||
with:
|
||||
sarif_file: 'trivy-results.sarif'
|
||||
|
||||
deploy-staging:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build-and-push, security-scan]
|
||||
if: github.ref == 'refs/heads/develop'
|
||||
|
||||
steps:
|
||||
- name: Deploy to staging
|
||||
run: |
|
||||
echo "Deploying to staging environment..."
|
||||
# Add your staging deployment commands here
|
||||
# This could include:
|
||||
# - Updating Kubernetes manifests
|
||||
# - Running helm charts
|
||||
# - Updating Docker Compose files
|
||||
# - Running database migrations
|
||||
|
||||
deploy-production:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build-and-push, security-scan]
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
|
||||
steps:
|
||||
- name: Deploy to production
|
||||
run: |
|
||||
echo "Deploying to production environment..."
|
||||
# Add your production deployment commands here
|
||||
# This could include:
|
||||
# - Updating Kubernetes manifests
|
||||
# - Running helm charts
|
||||
# - Updating Docker Compose files
|
||||
# - Running database migrations
|
||||
# - Health checks
|
||||
# - Rollback procedures
|
||||
Reference in New Issue
Block a user