-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathJenkinsfile
47 lines (42 loc) · 1.09 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
String cypressBaseImage = 'cypress/base:12.6.0'
String cypressBrowsersImage = 'cypress/browsers:node12.14.0-chrome79-ff71'
pipeline {
// agent {
// docker {
// image "${cypressBrowsersImage}"
// }
// }
agent {
dockerfile {
filename 'Dockerfile'
}
}
stages {
stage('build') {
steps {
echo "Running build ${env.BUILD_ID} on ${env.JENKINS_URL}"
sh 'npm ci'
sh 'npx cypress verify'
}
}
stage('test') {
environment {
CYPRESS_KEY='we;flwjef;lewjf;lwe'
}
steps {
echo "Running tests ${env.BUILD_ID} on ${env.JENKINS_URL}"
sh 'npm run chrome:ci'
}
}
}
// post {
// always {
// script{
// sh 'npm run combine-reports'
// sh 'npm run generate-report'
// sh 'npm run clean'
// }
// publishHTML([allowMissing: false, alwaysLinkToLastBuild: true, keepAll: true, reportDir: 'results', reportFiles: 'report.html', reportName: 'WebUi Test Report', reportTitles: ''])
// }
// }
}