0

I started to experiment with Gitlab-CI but i have some problems while running my builds. At this point i started to run PHPMD from the building using the following .gitlab-ci.yml

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

All this is ok and the build is fired. The problem is that the build keeps failing:

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

This is strange since when i run the command on the commandline it runs like a charm:

/tmp/phpmd/src/bin/phpmd /tmp/phpmd/src/main text cleancode,codesize,design

For further debugging i set the PHPMD executable to 777 (the full directory) using sudo chmod 777 -R /tmp/phpmd. This also reflects on the executable:

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

Thanks for the help

Dirkos
  • 488
  • 1
  • 10
  • 33
  • Are you testing the command by running the command on the Gitlab CI Multirunner host? I.e. is the /tmp/phpmd folder located on the host OS? I see that you are using the Docker executor with the default ruby:2.1 image. Unless you have linked in the /tmp/phpmd directory from somewhere else, the ruby:2.1 container will not contain any such folder. – Snorre Oct 16 '15 at 12:30
  • The multirunner runs on the same host as the gitlab-ci application? And yes the phpmd is installed over there. Are there other options instead of Docker that are better etc? And where is it running from so i can link it if needed – Dirkos Oct 21 '15 at 12:07

0 Answers0