未验证 提交 a5cb2ec5 编写于 作者: J Jesse Glick

Stop using `infra.runATH` (#7397)

* Stop using `infra.runATH`

* Forget execute bit https://github.com/jenkinsci/jenkins/pull/7397#discussion_r1024934609

* Apply suggestions from code review
Co-authored-by: NDamien Duportal <damien.duportal@gmail.com>

* More legible to read commands from a here-doc https://github.com/jenkinsci/jenkins/pull/7397#discussion_r1024933518

* May as well split up `run.sh` args by line too

* Spell out Bash options https://github.com/jenkinsci/jenkins/pull/7397#discussion_r1025152483Co-authored-by: NDamien Duportal <damien.duportal@gmail.com>
(cherry picked from commit 5350e26e)
上级 c76c5e60
......@@ -151,27 +151,9 @@ builds.ath = {
node('docker-highmem') {
// Just to be safe
deleteDir()
def fileUri
def metadataPath
dir('sources') {
checkout scm
def mavenOptions = [
'-Pquick-build',
'-Dmaven.repo.local=$WORKSPACE_TMP/m2repo',
'-am',
'-pl',
'war',
'package',
]
infra.runMaven(mavenOptions, 11)
dir('war/target') {
fileUri = 'file://' + pwd() + '/jenkins.war'
}
metadataPath = pwd() + '/essentials.yml'
}
dir('ath') {
runATH jenkins: fileUri, metadataFile: metadataPath
}
checkout scm
sh 'bash ath.sh'
junit testResults: 'target/ath-reports/TEST-*.xml', testDataPublishers: [[$class: 'AttachmentPublisher']]
}
}
}
......
#!/usr/bin/bash
set -o errexit
set -o nounset
set -o pipefail
set -o xtrace
cd $(dirname $0)
# https://github.com/jenkinsci/acceptance-test-harness/releases
export ATH_VERSION=5458.v911b_2f0818ee
# TODO use Artifactory proxy?
[ -f war/target/jenkins.war ] || mvn -B -ntp -Pquick-build -am -pl war package
mkdir -p target/ath-reports
chmod a+rwx target/ath-reports
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
---
ath:
useLocalSnapshots: false
athRevision: "5458.v911b_2f0818ee"
athImage: "jenkins/ath:5458.v911b_2f0818ee"
categories:
- org.jenkinsci.test.acceptance.junit.SmokeTest
jdks:
- 11
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册