• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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