@@ -6,7 +6,7 @@ set -o xtrace
66cd " $( dirname " $0 " ) "
77
88# https://github.com/jenkinsci/acceptance-test-harness/releases
9- export ATH_VERSION=6180.v889d0fe56785
9+ export ATH_VERSION=6242.v4b_a_848d63ed8
1010
1111if [[ $# -eq 0 ]]; then
1212 export JDK=17
2626mkdir -p target/ath-reports
2727chmod a+rwx target/ath-reports
2828
29+ curl \
30+ --fail \
31+ --silent \
32+ --show-error \
33+ --output /tmp/ath.yml \
34+ --location " https://raw.githubusercontent.com/jenkinsci/acceptance-test-harness/refs/tags/${ATH_VERSION} /docker-compose.yml"
35+
36+ sed -i -e " s/jenkins\/ath:latest/jenkins\/ath:${ATH_VERSION} /g" /tmp/ath.yml
37+
2938# obtain the groupId to grant to access the docker socket to run tests needing docker
30- dockergid=$( docker run --rm -v /var/run/docker.sock:/var/run/docker.sock ubuntu:noble stat -c %g /var/run/docker.sock)
39+ if [[ -z ${DOCKER_GID:- } ]]; then
40+ DOCKER_GID=$( docker run --rm -v /var/run/docker.sock:/var/run/docker.sock ubuntu:noble stat -c %g /var/run/docker.sock) || exit 1
41+ export DOCKER_GID
42+ fi
43+
44+ trap ' docker-compose --file /tmp/ath.yml kill && docker-compose --file /tmp/ath.yml down' EXIT
3145
32- exec docker run --rm \
46+ exec docker-compose \
47+ --file /tmp/ath.yml \
48+ run \
3349 --env JDK \
3450 --env ATH_VERSION \
3551 --env BROWSER \
36- --shm-size 2g ` # avoid selenium.WebDriverException exceptions like 'Failed to decode response from marionette' and webdriver closed` \
37- --group-add ${dockergid} \
52+ --name mvn \
53+ --no-TTY \
54+ --rm \
3855 --volume " $( pwd) " /war/target/jenkins.war:/jenkins.war:ro \
39- --volume /var/run/docker.sock:/var/run/docker.sock:rw \
4056 --volume " $( pwd) " /target/ath-reports:/reports:rw \
41- --interactive \
42- jenkins/ath:" $ATH_VERSION " \
57+ mvn \
4358 bash << -'INSIDE '
4459 set -o errexit
4560 set -o nounset
4661 set -o pipefail
4762 set -o xtrace
4863 cd
4964 set-java.sh "${JDK}"
50- # Start the VNC system provided by the image from the default user home directory
51- eval "$(vnc.sh)"
5265 env | sort
53- git clone --branch "$ATH_VERSION" --depth 1 https://github.com/jenkinsci/acceptance-test-harness
66+ git clone --branch "${ ATH_VERSION} " --depth 1 https://github.com/jenkinsci/acceptance-test-harness
5467 cd acceptance-test-harness
55- run.sh "$ BROWSER" /jenkins.war \
68+ run.sh "remote-webdriver-${ BROWSER} " /jenkins.war \
5669 -Dmaven.test.failure.ignore \
5770 -DforkCount=1 \
5871 -Dgroups=org.jenkinsci.test.acceptance.junit.SmokeTest
0 commit comments