forked from geogebra/geogebra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuitest.jenkinsfile
48 lines (43 loc) · 1.56 KB
/
uitest.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
#!/usr/bin/env groovy
String cron_string = BRANCH_NAME == "master" || BRANCH_NAME == "dev" ? 'H 10,19 * * 1-5' : ''
pipeline {
options {
overrideIndexTriggers(false)
buildDiscarder(logRotator(numToKeepStr: '10'))
}
agent {label 'aws-1'}
triggers {
cron(cron_string)
}
stages {
stage('Native check') {
steps {
sh "grep -rn 'import com.google.gwt' web-common/src retex/*/src web-dev/src gwtutil/src/ | sed 's/\\([0-9]:\\)/\\1 warning:/' "
recordIssues tool:java()
}
}
stage('Build Web JS') {
steps {
sh './gradlew web:deployIntoWar mergeDeploy -Pgdraft=true -Pgmodule="org.geogebra.web.Web3D,org.geogebra.web.Editor"'
dir('uitest') {
sh 'mkdir content; cp -r ../web/war/* content'
}
}
}
stage('Build') {
steps {
sh 'docker run --ipc=host --shm-size=1gb -u $(id -u):$(id -g) -e HOME=/work -w /work -v $PWD/uitest:/work -v $PWD/common:/common cypress/browsers:node-16.18.1-chrome-110.0.5481.96-1-ff-109.0-edge-110.0.1587.41-1 sh runtest.sh'
lighthouseReport file: './uitest/lighthouse.report.json'
}
post {
always {
junit '**/ui-tests.*.xml'
archiveArtifacts artifacts: 'uitest/cypress/videos/**', allowEmptyArchive: true
}
}
}
}
post {
always { cleanAndNotify() }
}
}