Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
Important Note - Windows users
Please use 'bat' instead 'sh' command !!
# Jenkins Node.js Project Setup
## **Objective**
Set up a Jenkins pipeline to build, test, and deploy a Node.js application.
## **Tasks**
1. **Create a GitHub repository** for the Node.js project and push the code.
2. **Configure Jenkins** to install the required tools.
3. **Create a Jenkins Pipeline Job** to automate the process.
4. **Define a `Jenkinsfile`** that includes the following stages:
- Clone the repository using Git.
- Install dependencies using:
sh 'npm install'
- Run tests with:
sh 'npm test || echo "No tests defined"'
- Build the application using the command:
sh 'npm run build'
5. **Execute the pipeline** in Jenkins and ensure all stages run successfully.
6. **Push the `Jenkinsfile`** to the repository.
## **Evaluation Criteria**
- Correct pipeline syntax and structure.
- Proper tool configuration in Jenkins.
- Successful execution of all stages.
- Implementation of the appropriate build command.
Complete the setup and run the pipeline in Jenkins. Good luck!