Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document Deployment::relativeRootPaths #439

Open
jonaseberle opened this issue Mar 5, 2021 · 3 comments
Open

Document Deployment::relativeRootPaths #439

jonaseberle opened this issue Mar 5, 2021 · 3 comments
Labels

Comments

@jonaseberle
Copy link
Contributor

Expected Behavior

The documentation should have Deployment::relativeRootPaths which was added for v2.0+ in f4d4f51

@jonaseberle
Copy link
Contributor Author

Sorry for the long stale time on this issue. I am trying that on a project now for the first time.
The project has a src folder which contains the default TYPO3 structure with composer.json etc.

I am using this config:

$application = new \TYPO3\Surf\Application\TYPO3\CMS();
$application
    ->setOption('webDirectory', 'public')
    ->setOption('symlinkDataFolders', ['fileadmin'])
    ...
$deployment
    ->setRelativeProjectRootPath('src')

This config will cause SymlinkDataTask to

cd '<deploymentPath>/releases/20210621112250/src' \
 && mkdir -p '../../shared/Data/fileadmin' \
 && ln -sf '../../../shared/Data/fileadmin' '<deploymentPath>/releases/20210621112250/src/public/fileadmin'

thus creating this structure

.
├── releases
│   ├── 20210621112250
│   │   └── src
│   │         └── public
│   │                └── fileadmin -> ../../../shared/Data/fileadmin
│   └── shared
│          └── Data
│                └── fileadmin
└── shared     [empty]

Also the WebOpcacheResetCreateScriptTask does not respect the relativeProjectRootPath yet and needs this config:

$deployment
    ->setTaskOptions(
        'TYPO3\Surf\Task\Php\WebOpcacheResetCreateScriptTask',
        [
            'scriptBasePath' => \TYPO3\Flow\Utility\Files::concatenatePaths(
                [
                    $deployment->getWorkspacePath($application),
                    $deployment->getRelativeProjectRootPath(),
                    $application->getOption('webDirectory'),
                ]
            ),
        ]
    )

I am not sure where to fix that.
My understanding would be that local paths need getRelativeProjectRootPath() while transfer tasks should just transfer the contents of getRelativeProjectRootPath() thus remote tasks would not need to care for it.

@jonaseberle
Copy link
Contributor Author

I have moved away from setRelativeProjectRootPath for multiple reasons.

As this seems pretty stale the feature could maybe be deprecated?

@jonaseberle jonaseberle removed their assignment Oct 6, 2021
@simonschaufi
Copy link
Collaborator

simonschaufi commented Oct 6, 2021

I actually have such a weird system myself and here it works (not a TYPO3 project) but yes, it's not recommended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants