-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
54 lines (54 loc) · 1.7 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
pipeline {
agent {
docker {
image 'node:latest'
args '-p 3000:3000'
}
}
environment {
CI = 'true'
}
stages {
stage('Install') {
steps {
sh 'yarn install --network-concurrency 1'
}
}
stage('Test') {
steps {
sh 'yarn test'
}
}
stage('Build') {
steps {
sh 'yarn build'
}
}
}
post {
always {
script {
properties([[$class: 'GithubProjectProperty',
projectUrlStr: 'https://github.com/clarity-h2020/map-component']])
}
step([$class: 'GitHubIssueNotifier',
issueAppend: true,
issueReopen: false,
issueLabel: 'CI',
issueTitle: '$JOB_NAME $BUILD_DISPLAY_NAME failed'])
}
failure {
emailext attachLog: true,
to: "dev@cismet.de",
subject: "Build of Map Component failed in Jenkins: ${currentBuild.fullDisplayName}",
body: """<p>FAILED: <a href='https://github.com/clarity-h2020/map-component'>Map Component</a> Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]':</p>"""
}
unstable {
emailext attachLog: true,
to: "dev@cismet.de",
subject: "Jenkins build became unstable: ${currentBuild.fullDisplayName}",
body: """<p>UNSTABLE: 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>"""
}
}
}