dancryer / PHPCI

PHPCI is a free and open source continuous integration tool specifically designed for PHP.
BSD 2-Clause "Simplified" License
2.42k stars 439 forks source link

Composer plugin freezing #1286

Closed tasselchof closed 7 years ago

tasselchof commented 7 years ago

When I am trying to build and application it's just freezing on this stage:

[2016-12-21 17:42:58] RunCommand.INFO: a5fa605b7446fffbb0227dceafa5bc5568267b8f {"buildID":"121"} [] [2016-12-21 17:42:58] RunCommand.INFO: Working copy created: /home/env/domains/phpci.env/PHPCI/build/121_9d602/ {"buildID":"121"} [] [2016-12-21 17:42:58] RunCommand.INFO: RUNNING PLUGIN: \PHPCI\Plugin\Composer {"buildID":"121"} [] [2016-12-21 17:42:58] RunCommand.DEBUG: Looking for binary: composer {"buildID":"121"} [] [2016-12-21 17:42:58] RunCommand.DEBUG: Found in : composer {"buildID":"121"} []

Seems like composer just not running, but application is freezes.

Command that are executed is (i removed --no-ansi --no-interaction for test):

[2016-12-21 18:00:14] RunCommand.INFO: /usr/local/bin/composer --working-dir="/home/env/domains/phpci.env/PHPCI/build/122_a3ed5/" install {"buildID":"122"} []

tasselchof commented 7 years ago

Problem was in my env, maybe better to add additional option to \PHPCI\Helper\BaseCommandExecutor to proc_open function, this way it outputs errors:

$process = proc_open($command, $descriptorSpec, $pipes, $this->buildPath, [ 'suppress_errors' => true, ]);

What is the idea to be turned off?

ptejada commented 7 years ago

I have not looked at the code but my guess is that stdout and stderr are suppose to be captured by the pipes.

It will be easier for someone to debug if they are able to reproduce the issue. What was the issue with composer in your environment?

On Thu, Dec 22, 2016, 12:54 PM Maxim notifications@github.com wrote:

Problem was in my env, maybe better to add additional option to \PHPCI\Helper\BaseCommandExecutor to proc_open function, this way it outputs errors:

$process = proc_open($command, $descriptorSpec, $pipes, $this->buildPath, [ 'suppress_errors' => true, ]);

What is the idea to be turned off?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Block8/PHPCI/issues/1286#issuecomment-268853988, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPd3fo8CGWAQFwZNyJGckeF5R2OJlj-ks5rKrlLgaJpZM4LTCOW .

--

Sincerely,

Pablo Tejada

From Mobile

tasselchof commented 7 years ago

Problem is that in my env there was no directory /usr/local/bin, php was installed in that and composer can't find this (i solved it by ln).

But there still an issue about HOME.

The problem is that without suppress_errors you can't debug: program just doing nothing for a lot's of time.

tasselchof commented 7 years ago

My fault, replaced env in proc_open function because of first issue with PHP (which i solved via ln).