Bug #62319

Enhance Task SymlinkConfigurationTask to use not only the Production context

Added by Johannes Steu almost 7 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Target version:
-
Start date:
2014-10-18
Due date:
% Done:

0%

Estimated time:

Description

For deployment i'd like to use the SymlinkConfigurationTask for all Contexts.
If you deploy your Application on different Nodes and run an separate testing Builds the Configuration could be stored in shared/Configuration/Testing. Same for the Development Context for Develop-Builds.

Therefore the SymlinkConfigurationTask could use $application->getContext().

#1

Updated by Johannes Steu almost 7 years ago

An implementation could look like this

$targetReleasePath = $deployment->getApplicationReleasePath($application);
$context = $application->getContext();
if($context === NULL || $context == "") {
throw new \TYPO3\Surf\Exception\InvalidConfigurationException("No context is configured");
}
$commands = array(
"cd {$targetReleasePath}/Configuration",
"rm Rf ".$context."/*",
"if [ -d ".$context." ]; then rmdir ".$context."; fi",
"mkdir -p ../../../shared/Configuration/".$context,
"ln -snf ../../../shared/Configuration/".$context." ".$context
);
$this
>shell->executeOrSimulate($commands, $node, $deployment);
#2

Updated by Christopher Hlubek over 6 years ago

  • Status changed from New to Resolved

Also available in: Atom PDF