TYPO3\Surf\Task\Package\GitTask

class GitTask

A Git package task.

Package an application by doing a local git update / clone before using the configured “transferMethod” to transfer assets to the application node(s).

It takes the following options:

  • repositoryUrl - The git remote to use.
  • fetchAllTags (optional) - If true, make a fetch on tags.
  • gitPostCheckoutCommands (optional) - An array with commands to execute after checkout.
  • hardClean (optional) - If true, execute a hard clean.
  • recursiveSubmodules (optional) - If true, handle submodules recursive.
  • verbose (optional) - If true, output verbose information from git.
Example:
$workflow
->setTaskOptions(‘TYPO3SurfTaskPackageGitTask’, [

‘repositoryUrl’ => ‘git@github.com:TYPO3/Surf.git’, ‘verbose’ => true, ‘recursiveSubmodules’ => true, ‘fetchAllTags’ => true, ‘hardClean’ => true, ‘gitPostCheckoutCommands’ => [

‘/var/www/outerspace’ => ‘composer install’

]

]

]

);

property shell

protected ShellCommandService

execute(Node $node, Application $application, Deployment $deployment, $options = [])

Execute this task

Parameters:
simulate(Node $node, Application $application, Deployment $deployment, $options = [])

Simulate this task

Parameters:
resolveSha1(Node $node, Deployment $deployment, $options)
Parameters:
Returns:

array

executeOrSimulateGitCloneOrUpdate($checkoutPath, Node $node, Deployment $deployment, $options)
Parameters:
  • $checkoutPath (string) –
  • $node (Node) –
  • $deployment (Deployment) –
  • $options (array) –
Returns:

array

executeOrSimulatePostGitCheckoutCommands($gitPath, $sha1, Node $node, Deployment $deployment, $options)
Parameters:
  • $gitPath
  • $sha1
  • $node (Node) –
  • $deployment (Deployment) –
  • $options (array) –
setShellCommandService(ShellCommandService $shellCommandService)
Parameters:
rollback(Node $node, Application $application, Deployment $deployment, $options = [])

Rollback this task

Parameters:
configureOptions($options = [])
Parameters:
  • $options (array) –
Returns:

array

resolveOptions(OptionsResolver $resolver)
Parameters:
  • $resolver (OptionsResolver) –