-
Notifications
You must be signed in to change notification settings - Fork 3
/
Jenkinsfile
51 lines (33 loc) · 1.11 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
stage 'Building'
node {
checkout scm
sh 'npm install'
}
//parallel integration testing
stage 'Testing'
node {
sh 'npm test -- --coverage'
notify("Deploy to staging?")
input 'Deploy to staging?'
}
// limit concurrency so we don't perform simultaneous deploys
// and if multiple pipelines are executing,
// newest is only that will be allowed through, rest will be canceled
stage name: 'Deploy to staging', concurrency: 1
node {
//sh 'git https://github.com/NaveenDK/mentalshortcuts.git'
// sh 'npm install'''
git branch: 'master',
url: 'https://github.com/NaveenDK/mentalshortcuts.git'
sh 'npm install'
sh 'npm run-script build'
notify 'Mental_shortcuts version 02 test webhook Deployed successfully!'
}
def notify(status){
emailext (
to: "naveenkolambage@gmail.com",
subject: "${status}: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'",
body: """<p>${status}: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]':</p>
<p>Check console output at <a href='${env.BUILD_URL}'>${env.JOB_NAME} [${env.BUILD_NUMBER}]</a></p>""",
)
}