umbraco / Umbraco.Cloud.Issues

Public issue tracker for Umbraco Cloud
26 stars 2 forks source link

Feature Request: Allow Deployment of Git Branch Other Than Main to a Development Environment #835

Open paulsterling opened 1 month ago

paulsterling commented 1 month ago

Issue description

Umbraco Cloud deployments use the "master" (or "main") branch when deploying to a Development environment. I propose allowing deployments from other Git branches. Additionally, I suggest providing an option to create a new environment directly from a specific Git branch (using the Flexible Environment feature). This flexibility will enable teams to test features, bug fixes, and other changes in isolated environments before merging them into the main branch.

I expect there are some additional considerations to be taken with this feature. Please feel free to add comments.

skttl commented 4 weeks ago

To change the deployment branch, you can do some Kudu magic, by sending a POST request to https://[your-project].scm.euwest01.umbraco.io/settings with the following JSON body

{
    "key": "deployment_branch", 
    "value": "[the branch you want to deploy from]" 
}

The request needs basic authentication with your cloud user and password.

Amalie-Wowern commented 4 weeks ago

@skttl could this be added to the ci/cd setup? Fx that test branch deploys developer enviroment and main deploys to staging

paulsterling commented 4 weeks ago

Thanks for the tip @skttl ! I'd still like to keep this feature request open since my thought is that it would be ideal to be able to do this from the portal when adding a new flexible environment to a project.