@@ -55,7 +55,7 @@ stage('Record builds and sessions') {
5555 }
5656 axes[' jenkinsVersions' ]. each { jenkinsVersion ->
5757 infra. withArtifactCachingProxy {
58- sh " rm -rf target && DISPLAY=:0 ./run.sh firefox ${ jenkinsVersion} -Dmaven.repo.local=${ WORKSPACE_TMP} /m2repo -B clean process-test-resources"
58+ sh " rm -rf target && DISPLAY=:0 ./src/main/resources/ath-container/ run.sh firefox ${ jenkinsVersion} -Dmaven.repo.local=${ WORKSPACE_TMP} /m2repo -B clean process-test-resources"
5959 }
6060 def coreCommit = sh(script : ' ./core-commit.sh' , returnStdout : true ). trim()
6161 /*
@@ -97,8 +97,6 @@ branches['CI'] = {
9797 }
9898}
9999
100- def skipImageBuild = env. CHANGE_ID && ! pullRequest. labels. contains(' build-image' )
101-
102100for (int i = 0 ; i < splits. size(); i++ ) {
103101 int index = i
104102 axes. values(). combinations {
@@ -122,11 +120,7 @@ for (int i = 0; i < splits.size(); i++) {
122120 retryCounts = retryCounts + 1 // increment the retry count before allocating a node in case it fails
123121 node(nodeLabel) {
124122 checkout scm
125- def image = skipImageBuild ? docker. image(' jenkins/ath' ) : docker. build(' jenkins/ath' , ' --build-arg uid="$(id -u)" --build-arg gid="$(id -g)" ./src/main/resources/ath-container/' )
126- sh ' mkdir -p target/ath-reports && chmod a+rwx target/ath-reports'
127- def cwd = pwd()
128- def dockergid = sh label : ' get docker group' , returnStdout : true , script : ' getent group docker | cut -d: -f3'
129- image. inside(" --group-add ${ dockergid} -v /var/run/docker.sock:/var/run/docker.sock -v '${ cwd} /target/ath-reports:/reports:rw' --shm-size 2g" ) {
123+ sh ' ./build-image.sh'
130124 def exclusions = splits. get(index). join(' \n ' )
131125 writeFile file : ' excludes.txt' , text : exclusions
132126 infra. withArtifactCachingProxy {
@@ -140,24 +134,14 @@ for (int i = 0; i < splits.size(); i++) {
140134 // but not letting the build to fail will cause next build not to try those tests again.
141135 allowEmptyResults : true
142136 ) {
143- sh """
144- set-java.sh ${ jdk}
145- # Ensure that Jenkins node setup does not influence the container java setup
146- unset JAVA_HOME
147- eval \$ (vnc.sh)
148- java -version
149- mvn -v
150- run.sh ${ browser} ${ jenkinsVersion} -Dmaven.repo.local=${ WORKSPACE_TMP} /m2repo -Dmaven.test.failure.ignore=true -Dcsp.rule -DforkCount=1 -B
151- cp --verbose target/surefire-reports/TEST-*.xml /reports
152- """
137+ sh " ./ci.sh ${ jdk} ${ browser} ${ jenkinsVersion} "
153138 }
154- }
155139 }
156140 withCredentials([string(credentialsId : ' launchable-jenkins-acceptance-test-harness' , variable : ' LAUNCHABLE_TOKEN' )]) {
157141 def sessionFile = " launchable-session-${ jenkinsVersion} -${ platform} -jdk${ jdk} -${ browser} .txt"
158142 unstash sessionFile
159143 def session = readFile(sessionFile). trim()
160- sh " launchable verify && launchable record tests --session ${ session} maven './target/ath -reports'"
144+ sh " launchable verify && launchable record tests --session ${ session} maven './target/surefire -reports'"
161145 }
162146 }
163147 }
0 commit comments