• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question Git webhook and branch

deleb

New Pleskian
Hi all :)

I read through the webhook documentation but there's one question I couldn't find the answer to.

Github triggers the webhooks on commits to any branch but I am only interested for Plesk to auto deploy updates from the branch I selected for the domain. Will Plesk check if the webhook was triggered by a commit on the selected branch or will it deploy everytime the webhook is triggered regardless of the branch?
 
So I've been doing some testing today...

I set up a domain with git on Plesk, enabled automatic deploys, set up a post deploy script, selected the "test" branch and added the specified webhook on GitHub.

After the set up, the "pull updates" button works like a charm, gets the repo to the local plesk repo, deploys the files and executes my script.

Then I try doing a commit to the "test" branch on GitHub, GitHub runs the webhook and Plesk pull the changes from "test" to the local repo, deploys the files and executes my script. Nice!

But then comes the interesting part, if I do a commit to the "dev" branch on GitHub, GitHub runs the webhook and Plesk tries to pull from "test", then (may or may not re do the deploy) and finally executes my script.

The way it seems to be set up, webhooks are not really an option for automatic deployments. Maybe only if you don't need a post script?

Does anyone use the webhooks with an auto deploy setting? Any suggestions to avoid my script being executed when there are no changes to the selected branch?

I believe it should be a good addition for Plesk to verify the webhook to ignore any changes on branches different from the one used to deploy from on the local repository.
 
Back
Top