-
Notifications
You must be signed in to change notification settings - Fork 0
/
jenkins.pipeline
48 lines (37 loc) · 1.03 KB
/
jenkins.pipeline
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
pipeline {
agent any
stages {
stage('Prep') {
steps {
sh "sed -i 's/XXX/${env.BUILD_NUMBER}/' ./package.json"
}
}
stage('NPM') {
steps {
sh "npm install && npm update"
}
}
stage('Build') {
steps {
sh "npm run build"
}
}
stage('Test') {
steps {
sh "npm run test"
}
}
stage('Deploy') {
steps {
sh "npm publish"
}
}
}
post {
always {
emailext body: "${currentBuild.currentResult}: Job ${env.JOB_NAME} build ${env.BUILD_NUMBER}\n More info at: ${env.BUILD_URL}",
recipientProviders: [[$class: 'DevelopersRecipientProvider'], [$class: 'RequesterRecipientProvider']],
subject: "Jenkins Build ${currentBuild.currentResult}: Job ${env.JOB_NAME}"
}
}
}