Junior — Middle
Do you have practical experience using Jenkins for build and delivery automation?
sobes.tech AI
Answer from AI
Yes, Jenkins is widely used for automating build, test, and deployment processes of applications, including Node.js projects.
A practical example of usage:
- Setting up a Jenkins Pipeline that automatically triggers a build upon a commit to the repository.
- Running commands to install dependencies (
npm install), run tests (npm test), and build the project. - Automatic deployment to a test or production server.
Example Jenkinsfile for a Node.js project:
pipeline {
agent any
stages {
stage('Install') {
steps {
sh 'npm install'
}
}
stage('Test') {
steps {
sh 'npm test'
}
}
stage('Build') {
steps {
sh 'npm run build'
}
}
}
}
This approach helps to speed up and standardize the development and delivery process.