forked from mgcrea/angular-strap
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathJenkinsfile
More file actions
44 lines (36 loc) · 1.1 KB
/
Jenkinsfile
File metadata and controls
44 lines (36 loc) · 1.1 KB
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
node('linux') {
stage('Prepare Workspace') {
// clean
deleteDir()
checkout scm
}
stage('Install Dependencies') {
nodejs(nodeJSInstallationName: 'NodeJS 8.x') {
sh 'npm install'
sh 'bower install'
}
}
stage('Build') {
nodejs(nodeJSInstallationName: 'NodeJS 8.x') {
sh 'npm run compile'
}
}
stage('Test') {
nodejs(nodeJSInstallationName: 'NodeJS 8.x') {
sh 'npm run lint'
sh 'npm test'
}
}
}
try {
if (env.BRANCH_NAME == "sumt-master" || env.BRANCH_NAME.startsWith('SS')) {
build job: 'Foundation Controls(GitHub_develop)', wait: false
}
} catch(e) {
echo 'Unable to find the Foundation control branch for downstream building. Not failing the build for this...'
emailext body: "Unable to find the Foundation control branch for angular-strap repository in github. Please view the build information here: ${env.BUILD_URL}",
from: 'Jenkins CI Server <jenkins-no-reply@sumtotalsystems.com>',
subject: 'The foundation-controls project build has failed',
to: 'SumTotal-DevOps-Build@skillsoft.com'
throw err
}