Skip to content

Instantly share code, notes, and snippets.

@tomasnorre
Created March 12, 2015 08:22
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomasnorre/772928763ed6d154e58a to your computer and use it in GitHub Desktop.
Save tomasnorre/772928763ed6d154e58a to your computer and use it in GitHub Desktop.
TYPO3Surf Deployment
<?php
$workflow = new \TYPO3\Surf\Domain\Model\SimpleWorkflow();
$workflow->setEnableRollback(FALSE);
$workflow->addTask('typo3.surf:typo3:flow:setfilepermissions',
array(
'username' => 'jenkins',
'webserverUsername' => 'www-data',
'webserverGroupname' => 'www-data'
)
);
$node = new \TYPO3\Surf\Domain\Model\Node('localhost');
$node->setHostname('integration');
$node->setOption('username', 'jenkins');
$application = new \TYPO3\Surf\Application\TYPO3\Flow();
$application->setDeploymentPath('/var/www/domain.tld/latest/');
$application->setContext('Production');
$application->setOption('transferMethod', 'rsync');
$application->setOption('packageMethod', 'git');
$application->setOption('updateMethod', NULL);
$application->setOption('keepReleases', 4);
$application->setOption('composerCommandPath', '/usr/local/bin/composer');
$application->setOption('repositoryUrl', 'https://username@bitbucket.org/username/repository.git');
$application->addNode($node);
$deployment->addApplication($application);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment