• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Git deployment with submodules and error handling

Ivo Smits

New Pleskian
Plesk Onyx, Version 17.0.17 Update #8, Debian 7.11, amd64, Git extension v1.0 rel 186

The new git deployment (as well as many other new features) looks very promising! I think I did find a small bug. My application repository has a submodule. Plesk did not automatically init/update the submodule. In addition after I manually copied the submodule, it had an incorrect .git reference file. This resulted in an error during deployment, which was not shown while using automatic deployment.

Reproduce:
- Create a git repository with a submodule (git init . && git submodule add https://github.com/twigphp/Twig.git twig && git add -a && git commit).
- Deploy to Plesk

Result:
- Plesk checks out the main repository, but not the subrepository.

Expected result:
- Plesk should init and update the subrepositories as well. If an error occurs during automatic deployment, this should be shown, or at least the operation should be marked as failed. Plesk may show a button to start manual deployment even in automatic deployment mode, to re-try a failed attempt or just to overwrite local changes.

I also noticed that the (additional deployment) actions input box shows up whenever the deployment mode is changed to manual or automatic even when the enable checkbox is unchecked.
 
Same issue here, would be nice if Plesk would support submodules in the git feature as the feature itself is pretty cool but this is kind of a major setback for my projects...
 
Last edited:
I've tried setting this up using the code below, but it's not working.

Using this in deployment actions, or manually via ssh:

Code:
git --git-dir=/var/www/vhosts/example.co.uk/git/example.co.uk.git --work-tree=/var/www/vhosts/example.co.uk/subdomain.example.co.uk submodule update --init --recursive

It gives this error:

Code:
fatal: not a git repository: '/var/www/vhosts/example.co.uk/git/example.co.uk.git

The example.co.uk.git directory does exist in the git directory, any help would be appreciated.

Thanks
 
Back
Top