Skip to content

Feature/jenkins pipeline - #5

Merged
yduclospro-dev merged 6 commits into
developfrom
feature/jenkins-pipeline
Jun 27, 2026
Merged

Feature/jenkins pipeline#5
yduclospro-dev merged 6 commits into
developfrom
feature/jenkins-pipeline

Conversation

@yduclospro-dev

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings June 27, 2026 13:10
@yduclospro-dev
yduclospro-dev force-pushed the feature/jenkins-pipeline branch from 68b897d to 45a21e0 Compare June 27, 2026 13:12
@yduclospro-dev yduclospro-dev self-assigned this Jun 27, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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.yml to 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 the Test stage. Since coverage artifacts are already generated by the earlier npm test -- --coverage, read and print the existing coverage/coverage-summary.json instead 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 thread docker-compose.yml
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}
Copilot AI review requested due to automatic review settings June 27, 2026 13:13
@yduclospro-dev
yduclospro-dev merged commit 9dc01f0 into develop Jun 27, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants