public function getDeployment($deploymentName, $configurationPath = null, $simulateDeployment = true, $initialize = true, $forceDeployment = false)
    {
        $deployment = $this->createDeployment($deploymentName, $configurationPath);
        if ($deployment->getLogger() === null) {
            $logger = $this->createLogger();
            if (! $simulateDeployment) {
                $logFilePath = Files::concatenatePaths([$this->getWorkspacesBasePath($configurationPath), 'logs', $deployment->getName() . '.log']);
                $logger->pushHandler(new StreamHandler($logFilePath));
            }
            $deployment->setLogger($logger);
        }

        $deployment->setForceRun($forceDeployment);

        if ($initialize) {
            $deployment->initialize();
        }

        $deployment->setDryRun($simulateDeployment);

        return $deployment;
    }