-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathJenkinsfile
49 lines (47 loc) · 1.13 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
pipeline {
agent none
stages {
stage('Build and Test') {
agent {
docker {
image 'node:10-stretch'
}
}
stages {
stage('Build') {
steps {
sh 'yarn'
sh 'yarn build'
archiveArtifacts artifacts: 'bin/*.js', fingerprint: true
}
}
stage('Test') {
steps {
sh 'apt-get update'
sh 'apt-get install libasound2 libxss1 libnss3-dev libatk-bridge2.0-0 libgtk-3-0 -y'
sh 'CHROME_BIN=/usr/bin/chromium yarn test'
}
}
stage('Report Test Results') {
steps {
cobertura(autoUpdateHealth: true, autoUpdateStability: true, coberturaReportFile: 'coverage/**/cobertura-coverage.xml', failUnhealthy: true, failUnstable: true)
}
}
}
}
stage('Build Docker') {
agent any
steps {
script {
def image = docker.build("bell:${BRANCH_NAME}", "--no-cache .")
}
}
}
stage('Deploy') {
agent any
steps {
sh "./scripts/deploy-dev.sh ${BRANCH_NAME}"
}
}
}
}