Skip to content

Commit 642fd58

Browse files
authored
Create Jenkinsfile
1 parent 1908a65 commit 642fd58

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

Jenkinsfile

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
pipeline {
2+
agent any
3+
4+
environment {
5+
NODE_VERSION = '20.17.0'
6+
}
7+
8+
stages {
9+
stage('Checkout Repository') {
10+
steps {
11+
checkout scm
12+
}
13+
}
14+
15+
stage('Chechout Node.js and npm') {
16+
steps {
17+
script {
18+
sh "node -v"
19+
sh "npm -v"
20+
}
21+
}
22+
}
23+
24+
stage('Install Dependencies') {
25+
steps {
26+
sh 'npm ci'
27+
}
28+
}
29+
30+
stage('Build Project') {
31+
steps {
32+
sh 'npm run build --if-present'
33+
}
34+
}
35+
}
36+
37+
post {
38+
success {
39+
echo 'Build completed successfully!'
40+
}
41+
failure {
42+
echo 'Build failed!'
43+
}
44+
}
45+
}

0 commit comments

Comments
 (0)