Murat
May 7, 2019, 1:18pm
1
Using the docker image https://hub.docker.com/r/loadimpact/k6/ .
There are no instructions, but a simple yml file is configured for GitLab.
We are blocked by a message: * level=error msg=“unknown command "sh" for "k6"”*
loadtest:
stage: performance-test
image: loadimpact/k6
only:
- k6test
script:
- pwd
- k6 run k6-performance/getSites.js
cache: {}
tags:
- DOCKER
- NOPROXY
- CLOUD
Murat
May 7, 2019, 1:53pm
2
same results with script : ‘k6 run ./k6-performance/getSites.js’ .
Since the ENTRYPOINT
of k6’s Dockerfile is k6
, you’d need to overwrite it in the GitLab CI file to be able to execute the commands you’ve specified in the script
list. You can do it like this: Run your CI/CD jobs in Docker containers | GitLab
2 Likes
Murat
May 7, 2019, 2:49pm
4
Pipeline still chokes with same output error.
loadtest:
stage: performance-test
image:
name: loadimpact/k6
entrypoint: ["k6"]
only:
- k6test
script:
- k6 run ./k6-performance/getSites.js
cache: {}
tags:
- DOCKER
- NOPROXY
- CLOUD
Murat
May 7, 2019, 2:53pm
5
Set entrypoint as empty and that worked!
loadtest:
stage: performance-test
image:
name: loadimpact/k6
entrypoint: [""]
only:
- k6test
script:
- k6 run ./k6-performance/getSites.js
cache: {}
tags:
- DOCKER
- NOPROXY
- CLOUD
3 Likes