forked from DevOps-Roadmap/frontend-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
42 lines (38 loc) · 1.05 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
pipeline{
agent any
stages{
stage("Build"){
steps{
sh 'cd coit-frontend && npm install && npm run build'
}
}
stage("Setup Env"){
steps{
sh "echo Installing Apache"
}
}
stage("Deploy"){
steps{
sh "echo Deploying the build folder"
}
}
stage("Cleanup"){
steps{
deleteDir()
}
}
}
post{
success{
archiveArtifacts artifacts: '**/build', followSymlinks: false
}
failure{
emailext body: '''Jenkins has failed to build the Job. Please find the information below.
Name of the Job: ${JOB_NAME}
Build that failed: ${BUILD_NUMBER}
Please check the logs at ${BUILD_URL}
Thanks
Jenkins''', subject: 'Failed ${JOB_NAME}', to: '[email protected]'
}
}
}