Skip to content

Feature/jenkins pipeline - #4

Merged
yduclospro-dev merged 17 commits into
developfrom
feature/jenkins-pipeline
Jun 22, 2026
Merged

Feature/jenkins pipeline#4
yduclospro-dev merged 17 commits into
developfrom
feature/jenkins-pipeline

Conversation

@yduclospro-dev

Copy link
Copy Markdown
Owner

No description provided.

@yduclospro-dev
yduclospro-dev merged commit adeb2cb into develop Jun 22, 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

This PR introduces a Jenkins-based CI/CD pipeline and containerization changes to support linting/testing, Docker builds, and deployment via Docker Compose, while adjusting the integration test setup and dev dependency versions to better align with the intended runtime environment.

Changes:

  • Added a Jenkinsfile pipeline that checks out code, installs deps, runs lint/tests with coverage, builds a Docker image, and deploys with Docker Compose.
  • Added Docker build assets for Nginx and Jenkins, and expanded docker-compose.yml to include Jenkins and build Nginx from a Dockerfile.
  • Updated the tasks integration test setup (module cache reset) and downgraded mongodb-memory-server for compatibility.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/integration/tasks.integration.test.js Tweaks test setup to ensure a fresh module load after Mongo Memory Server connection.
package.json Downgrades mongodb-memory-server dev dependency version.
package-lock.json Locks mongodb-memory-server and related transitive deps to the downgraded versions.
Jenkinsfile Adds a Jenkins pipeline for lint/test/coverage, Docker build, and Compose-based deploy.
Dockerfile.nginx Adds a minimal Nginx image build that bakes in the repo’s Nginx config.
Dockerfile.jenkins Adds a custom Jenkins image with Docker CLI/Compose and Node.js for builds/tests.
docker-compose.yml Hardcodes API env vars, switches Nginx to build, and adds a Jenkins service with Docker socket access.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docker-compose.yml
Comment on lines 22 to +26
restart: unless-stopped
env_file:
- .env
environment:
MONGO_URI: ${MONGO_URI:-mongodb://mongodb:27017/taskflow}
MONGO_URI: mongodb://mongodb:27017/taskflow
PORT: "5000"
NODE_ENV: ${NODE_ENV:-development}
NODE_ENV: production
Comment thread Jenkinsfile
docker compose stop api mongodb nginx || true
docker compose up -d --build api mongodb nginx
docker compose ps
curl -f http://localhost/health && echo "✅ API est healthy" || true
Comment thread Jenkinsfile
Comment on lines +67 to +68
echo '📊 Rapport de couverture des tests:'
sh 'npm test -- --coverage --passWithNoTests 2>&1 | grep -E "Statements|Branches|Functions|Lines|TOTAL" || true'
Comment thread Dockerfile.jenkins
Comment on lines +18 to +20
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
&& apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*
Comment thread docker-compose.yml
Comment on lines +57 to +59
container_name: taskflow-jenkins
user: root
restart: unless-stopped
Comment thread docker-compose.yml
Comment on lines +63 to +65
volumes:
- jenkins_home:/var/jenkins_home
- /var/run/docker.sock:/var/run/docker.sock
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