Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use custom DNS in the ath container to enable HAR recording #1331

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ for (int i = 0; i < splits.size(); i++) {
checkout scm
sh 'mkdir -p target/ath-reports && chmod a+rwx target/ath-reports'
def cwd = pwd()
docker.image('jenkins/ath').inside("-v /var/run/docker.sock:/var/run/docker.sock -v '${cwd}/target/ath-reports:/reports:rw' --shm-size 2g") {
docker.image('jenkins/ath').inside("-v /var/run/docker.sock:/var/run/docker.sock -v '${cwd}/target/ath-reports:/reports:rw' --shm-size 2g --add-host jenkins.127.0.0.1.sslip.io:127.0.0.1") {
def exclusions = splits.get(index).join('\n')
writeFile file: 'excludes.txt', text: exclusions
infra.withArtifactCachingProxy {
Expand Down
1 change: 1 addition & 0 deletions ath-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@ docker run \
-v /var/run/docker.sock:/var/run/docker.sock \
-v "$(pwd):/home/ath-user/sources" \
-v "${HOME}/.m2/repository:/home/ath-user/.m2/repository" \
--add-host jenkins.127.0.0.1.sslip.io:127.0.0.1 \
$tag \
/bin/bash -c "set-java.sh $java_version; bash"
2 changes: 1 addition & 1 deletion src/main/resources/ath-container/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ fi

set -x

BROWSER=$browser JENKINS_WAR=$war $MVN $extra_args "$@"
BROWSER=$browser JENKINS_LOCAL_HOSTNAME=jenkins.127.0.0.1.sslip.io JENKINS_WAR=$war $MVN $extra_args "$@"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be configurable?

Copy link
Member Author

@jtnord jtnord Aug 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could do it a different way - not modify the files and just start docker with the environment variable and the host I guess.

That way consumers will be unaffected, (but they would not get HAR files unless they adapted their usage)