From 62e8199c481cf1993957b576e5e4b80e1f797296 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Tue, 4 Oct 2022 17:16:36 +0200 Subject: [PATCH] Upgrade deployer --- composer.json | 3 +- composer.lock | 209 ++------------------------------------------------ deploy.php | 35 ++++----- 3 files changed, 24 insertions(+), 223 deletions(-) diff --git a/composer.json b/composer.json index c05284ac..21fe94d0 100644 --- a/composer.json +++ b/composer.json @@ -77,8 +77,7 @@ } }, "require-dev": { - "deployer/deployer": "^6.8", - "deployer/recipes": "^6.2", + "deployer/deployer": "^7", "ichhabrecht/filefill": "^3.3", "typo3/testing-framework": "^6.16" }, diff --git a/composer.lock b/composer.lock index 145c10d0..4b28a607 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "710142baed2d9361b6cb21b4424da20b", + "content-hash": "2ef2df59ab7af408bda8770f685e1b8b", "packages": [ { "name": "b13/container", @@ -8323,42 +8323,22 @@ "packages-dev": [ { "name": "deployer/deployer", - "version": "v6.9.0", + "version": "v7.0.2", "source": { "type": "git", "url": "https://github.com/deployphp/deployer.git", - "reference": "c4380effdc9f6d9c6ae549bb76f0a22bcb1d31d2" + "reference": "99a57a9035cfe0eeae5dba5befe5411ac0f3ac72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/deployphp/deployer/zipball/c4380effdc9f6d9c6ae549bb76f0a22bcb1d31d2", - "reference": "c4380effdc9f6d9c6ae549bb76f0a22bcb1d31d2", + "url": "https://api.github.com/repos/deployphp/deployer/zipball/99a57a9035cfe0eeae5dba5befe5411ac0f3ac72", + "reference": "99a57a9035cfe0eeae5dba5befe5411ac0f3ac72", "shasum": "" }, - "require": { - "deployer/phar-update": "~2.2", - "php": "^7.2 || ^8.0", - "pimple/pimple": "~3.0", - "symfony/console": "~2.7|~3.0|~4.0|~5.0", - "symfony/process": "~2.7|~3.0|~4.0|~5.0", - "symfony/yaml": "~2.7|~3.0|~4.0|~5.0" - }, - "require-dev": { - "phpunit/phpunit": "^8" - }, "bin": [ - "bin/dep" + "dep" ], "type": "library", - "autoload": { - "files": [ - "src/Support/helpers.php", - "src/functions.php" - ], - "psr-4": { - "Deployer\\": "src/" - } - }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" @@ -8378,131 +8358,11 @@ }, "funding": [ { - "url": "https://github.com/antonmedv", + "url": "https://github.com/sponsors/antonmedv", "type": "github" } ], - "time": "2022-08-03T18:09:01+00:00" - }, - { - "name": "deployer/phar-update", - "version": "v2.2.0", - "source": { - "type": "git", - "url": "https://github.com/deployphp/phar-update.git", - "reference": "9ad07422f2cd43a1382ee8e134bdcd3a374848e3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/deployphp/phar-update/zipball/9ad07422f2cd43a1382ee8e134bdcd3a374848e3", - "reference": "9ad07422f2cd43a1382ee8e134bdcd3a374848e3", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "symfony/console": "~2.7|~3.0|~4.0|~5.0" - }, - "require-dev": { - "mikey179/vfsstream": "1.1.0", - "phpunit/phpunit": "3.7.*", - "symfony/process": "~2.7|~3.0|~4.0|~5.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Deployer\\Component\\PharUpdate\\": "src/", - "Deployer\\Component\\PHPUnit\\": "src/PHPUnit/", - "Deployer\\Component\\Version\\": "src/Version/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kevin Herrera", - "email": "kevin@herrera.io", - "homepage": "http://kevin.herrera.io" - }, - { - "name": "Anton Medvedev", - "email": "anton@medv.io", - "homepage": "https://medv.io" - } - ], - "description": "Integrates Phar Update to Symfony Console.", - "homepage": "https://github.com/deployphp/phar-update", - "keywords": [ - "console", - "phar", - "update" - ], - "support": { - "issues": "https://github.com/deployphp/phar-update/issues", - "source": "https://github.com/deployphp/phar-update/tree/v2.2.0" - }, - "abandoned": true, - "time": "2019-12-12T13:45:57+00:00" - }, - { - "name": "deployer/recipes", - "version": "6.2.2", - "source": { - "type": "git", - "url": "https://github.com/deployphp/recipes.git", - "reference": "84b3229c518c094a950e1fe785b7b8f9598770fe" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/deployphp/recipes/zipball/84b3229c518c094a950e1fe785b7b8f9598770fe", - "reference": "84b3229c518c094a950e1fe785b7b8f9598770fe", - "shasum": "" - }, - "require": { - "php": "~7.0" - }, - "require-dev": { - "deployer/deployer": "^6.3" - }, - "type": "library", - "autoload": { - "files": [ - "autoload.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Anton Medvedev", - "email": "anton@medv.io" - } - ], - "description": "3rd party deployer recipes", - "homepage": "https://github.com/deployphp/recipes", - "keywords": [ - "cachetool", - "cloudflare", - "deploy", - "deployer", - "deployment", - "hipchat", - "newrelic", - "rabbit", - "recipes", - "sentry", - "slack", - "yarn" - ], - "support": { - "issues": "https://github.com/deployphp/recipes/issues", - "source": "https://github.com/deployphp/recipes" - }, - "abandoned": true, - "time": "2019-06-27T06:47:18+00:00" + "time": "2022-09-10T07:44:30+00:00" }, { "name": "ichhabrecht/filefill", @@ -9212,59 +9072,6 @@ ], "time": "2022-09-25T03:44:45+00:00" }, - { - "name": "pimple/pimple", - "version": "v3.5.0", - "source": { - "type": "git", - "url": "https://github.com/silexphp/Pimple.git", - "reference": "a94b3a4db7fb774b3d78dad2315ddc07629e1bed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/silexphp/Pimple/zipball/a94b3a4db7fb774b3d78dad2315ddc07629e1bed", - "reference": "a94b3a4db7fb774b3d78dad2315ddc07629e1bed", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/container": "^1.1 || ^2.0" - }, - "require-dev": { - "symfony/phpunit-bridge": "^5.4@dev" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4.x-dev" - } - }, - "autoload": { - "psr-0": { - "Pimple": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Pimple, a simple Dependency Injection Container", - "homepage": "https://pimple.symfony.com", - "keywords": [ - "container", - "dependency injection" - ], - "support": { - "source": "https://github.com/silexphp/Pimple/tree/v3.5.0" - }, - "time": "2021-10-28T11:13:42+00:00" - }, { "name": "sebastian/cli-parser", "version": "1.0.1", diff --git a/deploy.php b/deploy.php index 99fef389..38016e17 100644 --- a/deploy.php +++ b/deploy.php @@ -1,9 +1,9 @@ hostname('185.237.67.190') - ->stage('production') - ->user('p546128') - ->forwardAgent() - ->multiplexing() - ->set('deploy_path', '/home/www/p546128/html/{{application}}') + ->setHostname('185.237.67.190') + ->setRemoteUser('p546128') + ->setForwardAgent(true) + ->setSshMultiplexing(true) + ->setDeployPath('/home/www/p546128/html/{{application}}') ->set('buspronet_path', '/home/www/p546128/html/kuschick/buspronet/buspronet') ->set('bin/php', '/usr/local/bin/php') ->set('http_user', 'p546128') ->set('bin/composer', '/usr/local/bin/composer') + ->set('composer_options', '--prefer-dist --no-progress --no-interaction --optimize-autoloader') ->set('rsync_src', __DIR__) ->set('rsync', $rsyncOptions) - ->set('bin/cachetool', 'cachetool-7.0.0.phar') ->set('cachetool_args', '--web=SymfonyHttpClient --web-path={{release_path}}/public/ --web-url=https://www.ep-reisen.de') ; @@ -78,19 +75,18 @@ $sharedFilesStaging = get('shared_files'); $sharedFilesStaging[] = '{{typo3_webroot}}/.htpasswd'; host('staging') - ->hostname('185.237.67.190') - ->stage('staging') - ->user('p546128') - ->forwardAgent() - ->multiplexing() - ->set('deploy_path', '/home/www/p546128/html/{{application}}-staging') + ->setHostname('185.237.67.190') + ->setRemoteUser('p546128') + ->setForwardAgent(true) + ->setSshMultiplexing(true) + ->setDeployPath('/home/www/p546128/html/{{application}}-staging') ->set('buspronet_path', '/home/www/p546128/html/kuschick/buspronet/buspronet') ->set('bin/php', '/usr/local/bin/php') ->set('http_user', 'p546128') ->set('bin/composer', '/usr/local/bin/composer') + ->set('composer_options', '--prefer-dist --no-progress --no-interaction --optimize-autoloader') ->set('rsync_src', __DIR__) ->set('rsync', $rsyncOptions) - ->set('bin/cachetool', 'cachetool-7.0.0.phar') ->set('cachetool_args', '--web=SymfonyHttpClient --web-path={{release_path}}/public/ --web-url=https://staging.ep-reisen.de --web-basic-auth=ep:reisen') ->set('shared_files', $sharedFilesStaging) ; @@ -110,7 +106,6 @@ task('deploy', [ 'deploy:buspronet:symlink', 'deploy:unlock', 'cachetool:clear:opcache', - 'cleanup', ]); task('deploy:buspronet:symlink', function () {