我是一个初学者,我想尝试在Gitlab CI/CD上集成炮兵,所以我找了炮兵的文档,并找到了如何做炮兵的步骤。我按照说明并使用了文档中的示例配置:
artillery:
image:
name: artilleryio/artillery:latest
entrypoint: [""]
script: |
mkdir reports
/home/node/artillery/bin/artillery run --output reports/report.json tests/performance/socket-io.yml
/home/node/artillery/bin/artillery report --output reports/report reports/report.json
artifacts:
paths:
- reports来源:https://www.artillery.io/docs/guides/integration-guides/gitlab-ci-cd
我提交了文件,管道开始运行,但是过了一段时间,它失败了,错误是:
错误: /bin/sh: eval:第125行:/home/节点/火炮/bin/火炮:未找到
下面是完整的日志:
Running with gitlab-runner 15.3.0~beta.42.gdb7789ca (db7789ca)
on blue-4.shared.runners-manager.gitlab.com/default J2nyww-s
Preparing the "docker+machine" executor
Using Docker executor with image artilleryio/artillery:latest ...
Pulling docker image artilleryio/artillery:latest ...
Using docker image sha256:27f94fdd50befb4a245e7352f51747330c3b05922133681869c822460f9065a2 for artilleryio/artillery:latest with digest artilleryio/artillery@sha256:1637c7dd4ed15020612faef63f7e0be6200634c7336ad1bf5b60bab4b5f797b0 ...
Preparing environment
00:02
Running on runner-j2nyww-s-project-38396163-concurrent-0 via runner-j2nyww-s-shared-1660008636-37f7076a...
Getting source from Git repository
00:02
$ eval "$CI_PRE_CLONE_SCRIPT"
Fetching changes with git depth set to 20...
Initialized empty Git repository in /builds/trial304/artillery-load-test/.git/
Created fresh repository.
Checking out 51807ad5 as main...
Skipping Git submodules setup
Executing "step_script" stage of the job script
00:01
Using docker image sha256:27f94fdd50befb4a245e7352f51747330c3b05922133681869c822460f9065a2 for artilleryio/artillery:latest with digest artilleryio/artillery@sha256:1637c7dd4ed15020612faef63f7e0be6200634c7336ad1bf5b60bab4b5f797b0 ...
$ mkdir reports # collapsed multi-line command
/bin/sh: eval: line 125: /home/node/artillery/bin/artillery: not found
Cleaning up project directory and file based variables
00:00
ERROR: Job failed: exit code 127我一直在寻找答案,但我找不到任何解决方案来修复管道错误。非常欢迎您的意见,谢谢!
发布于 2022-08-09 02:02:42
如果运行此操作,则可以获得一个shell,以便可以查看目录的内容:
docker run -it --rm --entrypoint /bin/sh artilleryio/artillery:latest查看该目录的内容,我相信您要查找的是run命令:
/home/node/artillery/bin/run您可以通过运行run -h查看可用命令。所以我相信你想要这样:
/home/node/artillery/bin/run run --output reports/report.json tests/performance/socket-io.yml
/home/node/artillery/bin/run report --output reports/report reports/report.jsonhttps://stackoverflow.com/questions/73285708
复制相似问题