Skip to content

Commit c2a5113

Browse files
committed
describe how to capture the renovate traffic using mitmproxy mitmweb
1 parent 60d088b commit c2a5113

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

renovate.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,18 @@ export RENOVATE_REPOSITORIES="$RENOVATE_USERNAME/test"
140140
export RENOVATE_PR_HOURLY_LIMIT='0'
141141
export RENOVATE_PR_CONCURRENT_LIMIT='0'
142142
echo 'Running renovate...'
143+
# NB to capture the traffic using mitmproxy, start mitmweb in a different
144+
# shell, then enable the following if (i.e. true).
145+
docker_extra_args=()
146+
if false; then
147+
docker_extra_args+=(
148+
--env http_proxy=http://127.0.0.1:8080
149+
--env https_proxy=http://127.0.0.1:8080
150+
--env no_proxy=
151+
--env SSL_CERT_FILE=/usr/local/shared/ca-certificates/mitmproxy-ca.crt
152+
--volume "$HOME/.mitmproxy/mitmproxy-ca-cert.pem:/usr/local/shared/ca-certificates/mitmproxy-ca.crt:ro"
153+
)
154+
fi
143155
# NB use --dry-run=lookup for not modifying the repository (e.g. for not
144156
# creating pull requests).
145157
docker run \
@@ -155,7 +167,8 @@ docker run \
155167
--env RENOVATE_PR_CONCURRENT_LIMIT \
156168
--env LOG_LEVEL=debug \
157169
--env LOG_FORMAT=json \
158-
"renovate/renovate:$renovate_version-slim" \
170+
"${docker_extra_args[@]}" \
171+
"renovate/renovate:$renovate_version" \
159172
--platform=gitea \
160173
--git-url=endpoint \
161174
>tmp/renovate-log.json

0 commit comments

Comments
 (0)