• 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

Question Deploy different git branch on different subdomain

VojinP

Basic Pleskian
Server operating system version
Linux ubuntu
Plesk version and microupdate number
Obsidian, latest
We are working as a team on local computers. We have testing subdomain (test.domain.com) where we deploy main branch. And on prodcution domain (www.domain.com) we deploy production branch. Repository is on the plesk. Unfortunatelly there is only one automated deployment option (for single branch). Is there any way on Plesk Git to auto-deploy more branches?
 
Hello Peter, no, that is not what am I asking for. Changing deploy branch each time is painful process and buggy.
 
Let's say I have branches main and production. When I push branch main, it should deploy to /stage.domain.com , and when I push branch production, it should deploy to /httpdocs.
 
I'd like to second this. This was completely the default assumption of compatibility required when setting up prod/dev testing environments.

What I expect:
Assume we own "domain.com".

domain.com - pulls from git main branch
test.domain.com - pulls from git dev branch

This is not possible at all because the git repository already exists for domain.com.
The temporary solution is to either create an entirely new repository, or not use a subdomain at all, which further complicates/ignores the issue.

This should be a default in how the git extension works, as millions of folks standardize their testing with prod/dev stacks/environments.
Do we have any word on whether or not this feature will be introduced?
 
@Peter Debik there is simple solution for automatic deployment using selected branch. Please just add additional paramater for the webhook and pass its value to the deploy actions. That way we will be using that parameter to pull the changes from provided branch for eg:
plesk Webhook URL: .../git/public/web-hook.php?uuid=2377d&param1={BRANCH}
plesk Deploy actions: .../deploy-test.sh $param1
That way I can pull selected branch in the deploy-test.sh script and that branch is setup in deploy job in gitlab.
 
Back
Top