I want to run a curl request as a pre-request script for my K6 load tests. Here is my YML file:
- loadtest-local
image:
name: ubuntu:latest
loadtest-local:
image:
name: loadimpact/k6:latest
entrypoint: ['']
stage: loadtest-local
before_script:
- apk add --no-cache curl jq
script:
- echo "executing local k6 in k6 container..."
- >
curl google.com
- k6 run ./tests/script.js
When I run this in my pipeline I get the following error:
$ apk add --no-cache curl jq
ERROR: Unable to lock database: Permission denied
ERROR: Failed to open apk database: Permission denied
How can I add a curl request as a pre-request script in my YML?