-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJenkinsfile
64 lines (56 loc) · 1.32 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
node {
TESTCAFE_DOCKER_PATH = 'docker/Dockerfile'
}
pipeline {
agent {
dockerfile {
filename "${TESTCAFE_DOCKER_PATH}"
args '--net=host -e DISPLAY=":0"'
args '--entrypoint=\'\''
reuseNode true
}
}
environment {
HOME = '.'
}
stages {
stage('Clone scm') {
steps {
checkout([$class: 'GitSCM', branches: [
[name: '*/master']
],
userRemoteConfigs: [
[url: 'https://github.com/abhinaba-ghosh/testcafe-typescript-starter.git']
]
])
}
}
stage('Configuration') {
steps {
sh 'npm i --verbose'
sh 'npm run clean'
sh 'npm run lint'
}
}
stage('Run TestCafe') {
steps {
sh "npm run e2e:headless"
sh "npm run report"
}
}
stage('Publish Reports') {
steps{
publishHTML(
target: [
allowMissing : false,
alwaysLinkToLastBuild: false,
keepAll : true,
reportDir : './reports/allure/allure-report',
reportFiles : 'index.html',
reportName : "Allure Report"
]
)
}
}
}
}