-
Notifications
You must be signed in to change notification settings - Fork 0
[KAN-25] fix deploy workflow #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements CI/CD improvements and deployment configurations for the ceramicraft-user-mservice. The changes include fixing deployment workflows, setting up proper environment variable handling, and adding comprehensive testing and security scanning capabilities.
- Adds complete user service implementation with DAO layer and unit tests
- Fixes Docker deployment configuration with proper MySQL environment variable handling
- Implements comprehensive CI/CD workflows for testing, security scanning, and deployment
Reviewed Changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| server/Dockerfile | Creates Docker container with proper permissions and logs directory setup |
| server/config/config.go | Fixes MySQL password environment variable name from lowercase to uppercase |
| server/resources/config.yml | Updates MySQL host and log file path for containerized deployment |
| .github/workflows/deploy.yml | Adds manual deployment workflow with Docker Hub integration and MySQL password environment |
| server/service/user_service.go | Implements user service layer with create functionality |
| server/repository/dao/userDao.go | Adds user data access object with CRUD operations |
| server/service/user_service_test.go | Adds unit tests for user service with mock DAO |
| .github/workflows/pr_scan.yml | Implements SonarQube and Snyk security scanning workflows |
| .github/workflows/zap.yml | Adds ZAP security scanning for running application |
| .github/workflows/build.yml | Creates comprehensive build and test workflow for multi-module project |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| log: | ||
| level: debug | ||
| file_path: ./logs/user-server.log | ||
| file_path: ./logs/ceramicraf-user-mserver.log |
Copilot
AI
Sep 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a typo in the log file name. 'ceramicraf-user-mserver.log' should be 'ceramicraft-user-mserver.log' (missing 't' in 'ceramicraft').
| file_path: ./logs/ceramicraf-user-mserver.log | |
| file_path: ./logs/ceramicraft-user-mserver.log |
| run: | | ||
| docker stop ceramicraft-user-mservice || true | ||
| docker rm ceramicraft-user-mservice || true | ||
| docker run -d --name ceramicraft-user-mservice --network ceramicraft-network -p 8080:8080 "${DOCKER_HUB_USERNAME}/ceramicraft-user-mservice:${{ github.event.inputs.version }}" |
Copilot
AI
Sep 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The MYSQL_PASSWORD environment variable is missing in the rollback job's docker run command. This will cause the application to fail during rollback as it cannot connect to the database.
| docker run -d --name ceramicraft-user-mservice --network ceramicraft-network -p 8080:8080 "${DOCKER_HUB_USERNAME}/ceramicraft-user-mservice:${{ github.event.inputs.version }}" | |
| docker run -d --name ceramicraft-user-mservice --network ceramicraft-network -e MYSQL_PASSWORD=${{ secrets.MYSQL_PASSWORD }} -p 8080:8080 "${DOCKER_HUB_USERNAME}/ceramicraft-user-mservice:${{ github.event.inputs.version }}" |
name: fix deploy workflow
about: fix deploy related workflow & Dockerfile
labels: ["fix"]
变更内容 | Changes
相关 Issue | Related Issue
[KAN-25: User Service CI/CD ] (https://cerami-craft.atlassian.net/browse/KAN-25)
变更类型 | Type of Change
检查清单 | Checklist
变更影响 | Impact
none
测试说明 | Test Instructions
none
其他说明 | Additional Notes