MaxPermSize=512m' DOCKER_REGISTRY: 'ghcr.io' IMAGE_NAME: 'mycompany/spring-boot-app'jobs: # 代码质量检查和测试 quality-gate 2.2 Docker 镜像构建与推送 # Docker 镜像构建 build-image: needs: quality-gate runs-on: ubuntu-latest if # 开发环境自动部署 deploy-dev: needs: [quality-gate, build-image] runs-on: ubuntu-latest if: github.ref needs.quality-gate.outputs.version }} kubectl-version: 'latest' # 生产环境手动部署 deploy-prod: needs: [quality-gate protection_rules: required_reviewers: 2 restrict_pushes: true required_status_checks: - "quality-gate
基于2025年微服务部署最佳实践,典型的Spring Cloud流水线应包含以下优化阶段: stages: - security-scan - build - test - quality-gate /deploy-to-prod.sh when: manual allow_failure: false needs: ["security-check", "quality-gate"]
- codebuddy quality-gate --threshold 85 artifacts: reports: - quality-report.json -