Feature/jenkins pipeline - #5
Merged
Merged
Conversation
yduclospro-dev
force-pushed
the
feature/jenkins-pipeline
branch
from
June 27, 2026 13:12
68b897d to
45a21e0
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a Jenkins-based CI/CD pipeline and Docker Compose updates to support automated linting, testing, image builds, and deployment for the TaskFlow API.
Changes:
- Add a Jenkins pipeline (lint/test/coverage, Docker build, Compose deploy + health probing).
- Add Docker assets for Jenkins and Nginx, and extend
docker-compose.ymlto include Jenkins + updated runtime defaults. - Adjust test setup and dependency versions to support the CI environment (notably
mongodb-memory-server).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/integration/tasks.integration.test.js | Tweaks integration test bootstrapping to stabilize module loading. |
| src/config/db.js | Simplifies DB env var selection for connection string. |
| package.json | Downgrades mongodb-memory-server to a Node 18–compatible version. |
| package-lock.json | Locks updated dependency graph for the downgraded memory server. |
| Jenkinsfile | Adds Jenkins pipeline stages for checkout, lint, test/coverage, Docker build, and Compose deploy. |
| Dockerfile.nginx | Adds a custom Nginx image build to ship the repo’s Nginx config. |
| Dockerfile.jenkins | Adds a Jenkins image with Docker CLI/Compose and Node.js for running the pipeline. |
| docker-compose.yml | Adds Jenkins service, switches Nginx to build from Dockerfile, and adjusts API env/healthcheck wiring. |
| .eslintrc.json | Tightens no-unused-vars from warning to error for CI enforcement. |
Comments suppressed due to low confidence (2)
Jenkinsfile:89
post { always { ... } }reruns the full Jest suite, which increases pipeline time and can produce inconsistent results (tests/DB) compared to theTeststage. Since coverage artifacts are already generated by the earliernpm test -- --coverage, read and print the existingcoverage/coverage-summary.jsoninstead of running tests again.
always {
echo '📊 Rapport de couverture des tests:'
sh 'npm test -- --coverage --passWithNoTests 2>&1 | grep -E "Statements|Branches|Functions|Lines|TOTAL" || true'
}
docker-compose.yml:66
- This compose service mounts the host Docker socket and runs Jenkins as
root, which effectively grants the container full control of the host (root-equivalent). If this is only needed for CI, consider making the Jenkins service opt-in (Compose profiles) and avoid running it by default in local/prod environments.
container_name: taskflow-jenkins
user: root
restart: unless-stopped
ports:
- '8080:8080'
- '50000:50000'
volumes:
- jenkins_home:/var/jenkins_home
- /var/run/docker.sock:/var/run/docker.sock
environment:
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
23
to
+26
| environment: | ||
| MONGO_URI: mongodb://mongodb:27017/taskflow | ||
| PORT: "5000" | ||
| NODE_ENV: production | ||
| MONGO_URI: ${MONGO_URI:-mongodb://mongodb:27017/taskflow} | ||
| PORT: ${PORT:-5000} | ||
| NODE_ENV: ${NODE_ENV:-production} |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.