我开始尝试使用Gitlab-CI,但在运行构建时遇到了一些问题。此时,我开始使用以下.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 / main text cleancode,codesize,设计
为了进一步调试,我使用sudo chmod 777 -R /tmp/phpmd
将PHPMD可执行文件设置为777(完整目录)。这也反映在可执行文件:
-rwxrwxrwx 1 root root 7350 Oct 16 12:03 phpmd *
感谢您的帮助