Bug #59420

Make $localPackagePath configurable in RsyncTask

Added by Andreas Dörler almost 6 years ago. Updated over 4 years ago.

Status:
Accepted
Priority:
Should have
Assignee:
-
Target version:
-
Start date:
2014-06-09
Due date:
% Done:

0%


Description

Hi,

currently $localPackagePath is hardcoded to

$localPackagePath = $deployment->getWorkspacePath($application);

and the workspacePath is not configurable as far as I've seen:
  /**
   * Get a local workspace directory for the application
   */
  public function getWorkspacePath(Application $application) {
    return FLOW_PATH_DATA . 'Surf/' . $this->getName() . '/' . $application->getName();
  }

If one uses Jenkins for deployment, the source will be checked out from GIT by Jenkins itself, so there is no need to do it again in SURF.
Currently we use the following workaround:

  $application->setOption('transferMethod', NULL); // disable rsync
  $application->setOption('packageMethod', NULL); // disable SURF git checkout - we use jenkins git checkout
  $application->setOption('customrsync', array('customLocalPackagePath', '/var/lib/jenkins/workspace/'.$application->getName()));
  $workflow->addTask('typo3.surf:transfer:customrsync', 'transfer', $application);

In a copy of the default RsyncTask we use the given option if set:
$localPackagePath = (isset($options['customrsync']['customLocalPackagePath'])) ? $options['customrsync']['customLocalPackagePath'] : $deployment->getWorkspacePath($application);

It would be great to have this option included in TYPO3.Surf.

Kind regards
Andreas

History

#1 Updated by Helmut Hummel over 4 years ago

  • Status changed from New to Accepted

Not very easy to implement, but would be nice.

Development of TYPO3 Surf now moved to Github. If you think this is still relevant, please open a bug report or feature request here:

https://github.com/TYPO3/Surf

Also available in: Atom PDF