@@ -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+
2936# 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)
37+ if [[ -z ${DOCKER_GID:- } ]]; then
38+ 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
39+ export DOCKER_GID
40+ fi
41+
42+ trap ' docker-compose --file /tmp/ath.yml kill && docker-compose --file /tmp/ath.yml down' EXIT
3143
32- exec docker run --rm \
44+ exec docker-compose \
45+ --file /tmp/ath.yml \
46+ run \
3347 --env JDK \
3448 --env ATH_VERSION \
3549 --env BROWSER \
36- --shm-size 2g ` # avoid selenium.WebDriverException exceptions like 'Failed to decode response from marionette' and webdriver closed` \
37- --group-add ${dockergid} \
50+ --name mvn \
51+ --no-TTY \
52+ --rm \
3853 --volume " $( pwd) " /war/target/jenkins.war:/jenkins.war:ro \
39- --volume /var/run/docker.sock:/var/run/docker.sock:rw \
4054 --volume " $( pwd) " /target/ath-reports:/reports:rw \
41- --interactive \
42- jenkins/ath:" $ATH_VERSION " \
55+ mvn \
4356 bash << -'INSIDE '
4457 set -o errexit
4558 set -o nounset
4659 set -o pipefail
4760 set -o xtrace
4861 cd
4962 set-java.sh "${JDK}"
50- # Start the VNC system provided by the image from the default user home directory
51- eval "$(vnc.sh)"
5263 env | sort
53- git clone --branch "$ATH_VERSION" --depth 1 https://github.com/jenkinsci/acceptance-test-harness
64+ git clone --branch "${ ATH_VERSION} " --depth 1 https://github.com/jenkinsci/acceptance-test-harness
5465 cd acceptance-test-harness
55- run.sh "$ BROWSER" /jenkins.war \
66+ run.sh "remote-webdriver-${ BROWSER} " /jenkins.war \
5667 -Dmaven.test.failure.ignore \
5768 -DforkCount=1 \
5869 -Dgroups=org.jenkinsci.test.acceptance.junit.SmokeTest
0 commit comments