forked from vidyaraman0206/devops-node-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
30 lines (29 loc) · 847 Bytes
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
pipeline {
agent any
stages {
stage('Build') {
steps {
script {
def nodeVersion = tool name: 'NodeJS', type: 'jenkins.plugins.nodejs.tools.NodeJSInstallation'
sh "${nodeVersion}/bin/npm install"
}
}
}
stage('Test') {
steps {
script {
def nodeVersion = tool name: 'NodeJS', type: 'jenkins.plugins.nodejs.tools.NodeJSInstallation'
sh "${nodeVersion}/bin/npm test"
}
}
}
stage('Deploy') {
steps {
script {
// Replace with your deployment script or commands
echo "Deploying to production..."
}
}
}
}
}