deploy via deployer

parent 2bb4c871
......@@ -43,13 +43,12 @@ layout:
- build
.deploy-template: &deploy_template
image: php:7.0-alpine
stage: deploy
script:
- apk add openssh-client
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | ssh-add -
- php surf.phar simulate Development
- ./.gitlab-ci/scripts/deployer.sh -f/src/.gitlab-ci/deployer/deploy.php deploy ${CI_BUILD_REF_NAME}
when: manual
dependencies:
- layout
......
<?php
namespace Deployer;
require_once '/composer/vendor/deployer/deployer/recipe/common.php';
require_once '/composer/vendor/deployer/recipes/rsync.php';
$sharedDirectories = [
'html/fileadmin',
'html/uploads',
'html/.well-known'
];
set('shared_dirs', $sharedDirectories);
$sharedFiles = [
'html/typo3conf/LocalConfiguration.php',
];
set('shared_files', $sharedFiles);
$writeableDirectories = [
'html/typo3temp',
'html/fileadmin',
'html/uploads'
];
set('writable_dirs', $writeableDirectories);
$exclude = [
'.gitignore',
'.htaccess',
'.git',
'Readme.rst',
'Readme.txt',
'Upgrading.rst',
'Upgrading.txt',
'README',
'*.example',
'AdditionalConfiguration.sample.php'
];
set('rsync', [
'exclude' => array_merge($sharedDirectories, $sharedFiles, $exclude),
'exclude-file' => false,
'include' => [],
'include-file' => false,
'filter' => [],
'filter-file' => false,
'filter-perdir' => false,
'flags' => 'az',
'options' => ['delete'],
'timeout' => 300
]);
set('rsync_src', '/src/');
set('keep_releases', 10);
serverList('/src/.gitlab-ci/deployer/servers.yml');
task('deploy', [
'deploy:prepare',
'deploy:release',
'rsync:warmup',
'rsync',
'deploy:shared',
'deploy:writable',
'deploy:symlink',
'cleanup'
]);
master:
host: vpro0100.proserver.punkt.de
port: 22
user: proserver
forward_agent: true
deploy_path: /var/www/master
develop:
host: vpro0100.proserver.punkt.de
port: 22
user: proserver
forward_agent: true
deploy_path: /var/www/develop
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment