2022-11-22 05:38:50 +08:00
|
|
|
#!/usr/bin/bash
|
|
|
|
set -o errexit
|
|
|
|
set -o nounset
|
|
|
|
set -o pipefail
|
|
|
|
set -o xtrace
|
2022-12-20 18:27:04 +08:00
|
|
|
cd "$(dirname "$0")"
|
2022-11-22 05:38:50 +08:00
|
|
|
|
|
|
|
# https://github.com/jenkinsci/acceptance-test-harness/releases
|
2022-12-12 00:07:13 +08:00
|
|
|
export ATH_VERSION=5478.vb_b_cd04943676
|
2022-11-22 05:38:50 +08:00
|
|
|
|
|
|
|
# TODO use Artifactory proxy?
|
|
|
|
|
2022-12-20 18:27:04 +08:00
|
|
|
[[ -f war/target/jenkins.war ]] || mvn -B -ntp -Pquick-build -am -pl war package
|
2022-11-22 05:38:50 +08:00
|
|
|
|
|
|
|
mkdir -p target/ath-reports
|
|
|
|
chmod a+rwx target/ath-reports
|
|
|
|
|
2022-12-20 18:27:04 +08:00
|
|
|
exec docker run --rm \
|
|
|
|
--env ATH_VERSION \
|
|
|
|
--shm-size 2g `# avoid selenium.WebDriverException exceptions like 'Failed to decode response from marionette' and webdriver closed` \
|
|
|
|
--volume "$(pwd)"/war/target/jenkins.war:/jenkins.war:ro \
|
|
|
|
--volume /var/run/docker.sock:/var/run/docker.sock:rw \
|
|
|
|
--volume "$(pwd)"/target/ath-reports:/reports:rw \
|
|
|
|
--interactive \
|
|
|
|
jenkins/ath:"$ATH_VERSION" \
|
|
|
|
bash <<-'INSIDE'
|
|
|
|
set -o errexit
|
|
|
|
set -o nounset
|
|
|
|
set -o pipefail
|
|
|
|
set -o xtrace
|
|
|
|
cd
|
|
|
|
# Start the VNC system provided by the image from the default user home directory
|
|
|
|
eval "$(vnc.sh)"
|
|
|
|
env | sort
|
|
|
|
git clone --branch "$ATH_VERSION" --depth 1 https://github.com/jenkinsci/acceptance-test-harness
|
|
|
|
cd acceptance-test-harness
|
|
|
|
run.sh firefox /jenkins.war \
|
|
|
|
-Dmaven.test.failure.ignore \
|
|
|
|
-DforkCount=1 \
|
|
|
|
-Dgroups=org.jenkinsci.test.acceptance.junit.SmokeTest
|
|
|
|
cp --verbose target/surefire-reports/TEST-*.xml /reports
|
|
|
|
INSIDE
|