-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathJenkinsfile
87 lines (80 loc) · 1.91 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
// Development Jenkinsfile
pipeline {
agent any
options {
buildDiscarder(logRotator(artifactDaysToKeepStr: '30', artifactNumToKeepStr: '15', daysToKeepStr: '150', numToKeepStr: '15'))
disableConcurrentBuilds()
ansiColor('xterm')
timeout(time: 15, unit: 'MINUTES')
}
environment {
NPM_CONFIG_PREFIX=".npm"
NPM_CONFIG_CACHE="npm_cache"
}
stages {
stage('checkout') {
steps {
checkout scm
}
}
stage('install') {
agent {
docker {
image 'node:10.16.3'
reuseNode true
}
}
steps {
sh """
cd examples/base-implementation
rm -rf allure
npm ci
"""
}
}
stage('test:e2e') {
agent {
docker {
image 'circleci/node:10.16.3-browsers'
reuseNode true
}
}
stages {
stage('test:e2e:run:chrome') {
environment {
// https://github.com/DevExpress/testcafe/issues/1133#issuecomment-350775990
// Chrome needs the --no-sandbox flag to run the tests in a docker container
TESTCAFE_BROWSER = "chrome:headless --no-sandbox"
}
steps {
sh """
cd examples/base-implementation
npm run test:e2e:api
"""
}
}
}
}
stage('test:reports') {
steps {
script {
allure([
commandline: 'allure-2.x',
includeProperties: false,
jdk: '',
results: [[path: 'examples/base-implementation/allure/allure-results']]
])
}
}
}
}
post {
changed {
emailext(
subject: "${currentBuild.currentResult}: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'",
body: '${JELLY_SCRIPT, template="html"}',
recipientProviders: [developers(), culprits(), requestor()]
)
}
}
}