Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
feat: new global tags: terter_hostname and test_suite_name
Browse files Browse the repository at this point in the history
  • Loading branch information
fczuardi committed Feb 29, 2024
1 parent 3a7a30e commit bca7386
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ _setup: _setup-rclone _setup-aws _setup-mgc
# run k6 test with env vars and outputs to JSON and Prometheus if url is set
_k6-run remote testname results_dir *args:
#!/usr/bin/env sh
tester_hostname=$(hostname)
prometheus_rw_url=$(dasel -f "{{config_file}}" 'prometheus_rw_url')
prometheus_output_arg=""
if [ -n "$prometheus_rw_url" ]; then
Expand All @@ -193,6 +194,8 @@ _k6-run remote testname results_dir *args:
k6 run src/k6/{{testname}}.js \
--address localhost:0 \
--tag "remote={{remote}}" \
--tag "test_suite_name=$TEST_SUITE" \
--tag "tester_hostname=$tester_hostname" \
--quiet \
--vus={{k6_vus}} --iterations={{k6_iterations}} \
--env AWS_CLI_PROFILE={{remote}} \
Expand Down

0 comments on commit bca7386

Please sign in to comment.