-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
67 lines (63 loc) · 1.58 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
pipeline{
agent any
stages{
stage("Setup"){
steps{
echo "========Setup========"
sh "npm install"
}
}
stage("lint"){
steps{
echo "========lint========"
sh "npm run lint"
}
}
stage("UnitTest"){
steps{
echo "========UNIT TEST========"
sh "npm run jest -- --coverage"
}
}
stage("Cleen Up"){
steps{
echo "========Clean up========"
sh "rm -rf ${env.WORKSPACE}/node_modules"
}
}
stage("Pre build"){
steps{
echo "====Pre Build===="
sh "bash ${env.WORKSPACE}/pre-build-script.sh"
}
}
stage("Build"){
steps{
echo "====Build===="
sh " tar -czvf archive.tar.gz ./src/"
}
}
stage("Intergration"){
steps{
echo "====Intergration===="
sh "docker-compose up --exit-code-from cypress"
}
post{
always{
sh "docker-compose rm -f"
sh "docker rmi blogboardpipe_express-app"
}
}
}
stage("Publish"){
steps{
echo "====Publish===="
}
}
}
post{
always{
archiveArtifacts artifacts: "archive.tar.gz", fingerprint: true, followSymlinks: false
}
}
}