Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI's job succeeded even there is an PHP error inside #1236

Closed
dakur opened this issue May 24, 2017 · 1 comment
Closed

CI's job succeeded even there is an PHP error inside #1236

dakur opened this issue May 24, 2017 · 1 comment
Labels

Comments

@dakur
Copy link

dakur commented May 24, 2017

Q A
Issue Type Bug
Deployer Version 5.0.1
Local Machine OS Ubuntu 14.04.5 LTS
Remote Machine OS -

Description

When I've accidentally made typo in function name, CI job has succeeded even there was an error inside the job. I guess there is some bad exit code.

Steps to reproduce

Set up a deploy with bad function name (I typed host() instead of hostname()) and make a deploy in GitLab CI.

Content of deploy.php

<?php

namespace Deployer;


/** @noinspection PhpIncludeInspection recipe comes from Deployer tool */
require 'recipe/common.php';



// CONFIGURATION

set('ssh_type', 'native');
set('ssh_multiplexing', TRUE);

set('shared_files', [
	'...',
]);
set('shared_dirs', [
	'...',
]);
set('writable_dirs', [
	'...',
]);


// SERVERS

host('mysite')
	->stage('mysite')
	->host('10.0.0.2') // typo in here
	->port(22)
	->user('someuser')
	->identityFile('/root/.ssh/id_rsa')
	->set('deploy_path', '/var/www/web');

// TASKS

task('deploy:copy_application', function () {
	upload('..', '{{release_path}}');
});

// For definitions of tasks bellow:
// @see https://github.com/deployphp/deployer/tree/master/recipe/deploy
desc('Deploy your project');
task('deploy', [
	'deploy:prepare',
	'deploy:lock',
	'deploy:release',

	'deploy:copy_application',

	'deploy:copy_dirs',

	'deploy:shared',
	'deploy:writable',

	'deploy:symlink',

	'deploy:unlock',
	'cleanup',
	'success',
]);

after('deploy:failed', 'deploy:unlock');

Output log

 dep deploy mysite --ansi -vvv

 [Error] Call to undefined method Deployer\Host\Host::host()                    

 #0 /root/.composer/vendor/deployer/deployer/src/Deployer.php(309): require()   
 #1 [internal function]: Deployer\Deployer::Deployer\{closure}()                
 #2 /root/.composer/vendor/deployer/deployer/src/Deployer.php(310):             
 call_user_func(Object(Closure))                                                
 #3 /root/.composer/vendor/deployer/deployer/bin/dep(120):                      
 Deployer\Deployer::run('master', '/builds/nakloub...')                         
 #4 {main}                                                                      

Job succeeded
@antonmedv antonmedv added the bug label May 24, 2017
@antonmedv
Copy link
Member

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants