A simple Pong web game with a CI/CD pipeline for build, test, SonarQube analysis, Docker image build, and push.
Efficient, automated steps GitLab pipeline:
- Checkout code
- Install dependencies
- Run tests
- SonarQube analysis (Modify)
- Build Docker image
- Push Docker image to registry (Modify)
npm install
npm startVisit http://localhost:8080.
- GitHub Actions pipeline for build, test, SonarQube scan, Docker image build and push.
- Update
.sonarcloud.propertieswith your project/organization details. - Set
SONAR_TOKENandSONAR_HOST_URLas GitHub repository secrets. - Uses GitHub Container Registry (
ghcr.io). UpdateREGISTRYin workflow if using another registry.
docker build -t pong-game .
docker run -p 8080:8080 pong-game