forked from daattali/beautiful-jekyll
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtemp.js
60 lines (41 loc) · 1.16 KB
/
temp.js
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
node {
nodejs(nodeJSInstallationName: 'NodeJS 7.7.4') {
currentBuild.result = "SUCCESS"
try {
stage('Checkout'){
checkout scm
}
stage ('Test'){
env.NODE_ENV = "test"
print "Environment will be : ${env.NODE_ENV}"
sh 'node -v'
sh 'npm prune'
sh 'npm install'
sh 'bower install'
sh 'grunt build'
sh 'grunt mochaTest'
}
stage ('Build Docker') {
print"building application would happen here via executing a bash script"
sh './dockerBuild.sh'
}
stage('Deploy') {
print"deploying application would happen here"
echo 'Push to Repo'
//sh './dockerPushToRepo.sh'
echo 'ssh to web server and tell it to pull new image'
//sh 'ssh deploy@xxxxx.xxxxx.com running/xxxxxxx/dockerRun.sh'
}
stage ('Cleanup'){
echo 'prune and cleanup'
sh 'npm prune'
sh 'rm node_modules -rf'
}
}
catch (err) {
currentBuild.result = "FAILURE"
print "project build error is here: ${env.BUILD_URL}"
throw err
}
}
}