0

我开始尝试使用 Gitlab-CI,但在运行构建时遇到了一些问题。此时我开始使用以下命令从建筑物中运行 PHPMD.gitlab-ci.yml

phpmd:
script:
-  /tmp/phpmd/src/bin/phpmd app/code/local text cleancode,codesize,design

所有这一切都很好,构建被解雇了。问题是构建不断失败:

gitlab-ci-multi-runner 0.5.2 (adb8153) 
Using Docker executor with image ruby:2.1 ...
Starting service mysql:latest ...
Starting service redis:latest ...
Waiting for services to be up and running...
Running on runner-42afea22-project-4-concurrent-0 via LINXAACC101...
Cloning repository...
Cloning into '/builds/MyProject/Foo'...
Checking out a3e2b48f as development...
$ /tmp/phpmd/src/bin/phpmd app/code/local text cleancode,codesize,design
/builds/Dynalean/Tekenzeker.sh: line 22: /tmp/phpmd/src/bin/phpmd: No such file or directory
ERROR: Build failed with: exit code 1

这很奇怪,因为当我在命令行上运行命令时,它运行起来就像一个魅力:

/tmp/phpmd/src/bin/phpmd /tmp/phpmd/src/正文 cleancode,codesize,design

为了进一步调试,我将 PHPMD 可执行文件设置为 777(完整目录),使用sudo chmod 777 -R /tmp/phpmd. 这也反映在可执行文件上:

-rwxrwxrwx 1 根 7350 Oct 16 12:03 phpmd*

谢谢您的帮助

4

0 回答 0