Deployer hang on success or fail on gitlab runner shell #3295
Unanswered
programadorwebfreelance
asked this question in
Help needed
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
It seems that it does not return status exit.
deploy.php
require 'recipe/cakephp.php';
set('ssh_multiplexing', true);
set('bin/composer', function () {
return '{{bin/php}} /usr/lib64/plesk-9.0/composer.phar';
});
$config = [];
$configFile = dirname(dirname(FILE)) . '/.deploy.ini';
if (file_exists($configFile)) {
$config = parse_ini_file($configFile);
}
$getConfig = function (string $key) use ($config): ?string {
if ($envValue = getenv($key)) {
return $envValue;
}
};
$projectName = $getConfig('DEPLOY_PROJECT_NAME') ?? 'project';
set('repository', '[email protected]:programadorwebfreelance/{$projectName}.git');
host('master')
->setHostname( '$projectName.master.xxxx.com")
->setIdentityFile('~/.ssh/id_rsa')
->setRemoteUser($getConfig('SERVER_USER'))
->setSshArguments(['-o UserKnownHostsFile=/dev/null'])
->set('branch', 'master')
->set('composer_options', '--verbose --prefer-dist --optimize-autoloader --no-progress --no-interaction')
->set('deploy_path', '/var/www/vhosts/xxx.xcom'.$projectName.'/master');
set('shared_dirs', [
'logs',
'files',
]);
set('shared_files', [
'config/app_local.php',
'config/asset_compress.local.ini',
]);
task('deploy:run_migrations', function () {
run('{{bin/php}} {{release_path}}/bin/cake.php migrations migrate --no-lock');
run('{{bin/php}} {{release_path}}/bin/cake.php schema_cache build');
})->desc('Run migrations, clear all caches');
Beta Was this translation helpful? Give feedback.
All reactions