Skip to content

Commit 0aad8bd

Browse files
committed
chore: update http.server root
1 parent 97610f9 commit 0aad8bd

File tree

1 file changed

+30
-9
lines changed

1 file changed

+30
-9
lines changed

.github/workflows/e2e-tests-linux-split.yml

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -276,28 +276,49 @@ jobs:
276276
run: |
277277
cat >prometheus.yml <<EOF
278278
global:
279-
scrape_interval: 15s
279+
scrape_interval: 5s
280280
scrape_configs:
281281
- job_name: 'e2e-perf-metrics'
282282
static_configs:
283-
- targets: ['http-server:8000']
284-
metrics_path: '/prometheus.txt'
283+
- targets: ['pushgateway:9091']
285284
remote_write:
286285
- url: "$PUSH_URL"
287286
basic_auth:
288287
username: "$PUSH_USER"
289288
password: "$PUSH_PASS"
290289
EOF
291-
cat ./artifacts/metrics/prometheus.txt
290+
pwd
291+
ls -al ./artifacts/metrics/prometheus.txt
292292
293-
- name: Start Python HTTP server
293+
- name: Start pushgateway server
294294
run: |
295-
docker run -d --name http-server -v $(pwd):/app -w /app -p 8000:8000 python:3.11-slim python -m http.server 8000 > http.log 2>&1
295+
docker run -d --name pushgateway -p 9091:9091 prom/pushgateway
296+
cat ./artifacts/metrics/prometheus.txt | curl --data-binary @- http://localhost:9091/metrics/job/e2e-perf
297+
#docker run -d --name http-server -v $(pwd):/app -w /app -p 8000:8000 python:3.11-slim python -m http.server 8000 > http.log 2>&1
298+
printf '\n*****************\n'
299+
echo 'This is my current directory:'
296300
pwd
301+
printf '\n*****************\n'
302+
echo 'This is ls -al in that directory'
303+
ls -al
304+
printf '\n*****************\n'
305+
306+
- name: Test prometheus auth
307+
run: |
308+
# get a shell
309+
docker exec -it prometheus sh
310+
# from inside:
311+
curl -v -u "$PUSH_USER:$PUSH_PASS" "$PUSH_URL"
312+
297313
- name: Run Prometheus
298314
run: |
299-
docker run -d --name prometheus -v $(pwd):/etc/prometheus -p 9090:9090 --link http-server prom/prometheus:latest --config.file=/etc/prometheus/prometheus.yml --web.listen-address=:9090 > prom.log 2>&1
300-
sleep 60
301-
# Uncomment for troubleshooting.
315+
docker run --name prometheus -v $(pwd):/etc/prometheus -p 9090:9090 --link pushgateway:pushgateway prom/prometheus:latest --config.file=/etc/prometheus/prometheus.yml --web.listen-address=:9090 --log.level=debug
316+
sleep 200
317+
# # Uncomment for troubleshooting.
318+
printf '\n*****************\n'
319+
printf '\n curl e2e_cpu_seconds_total \n'
302320
curl http://localhost:9090/api/v1/query?query=e2e_cpu_seconds_total
321+
printf '\n*****************\n'
322+
printf 'cat prom.log'
323+
cat prom.log
303324

0 commit comments

Comments
 (0)