Umbraco.Cloud.Issues
Umbraco.Cloud.Issues copied to clipboard
Don't run deployment commands, when pushing other branches than master
Working the cloud developer course I ran into this one again.
Copied from https://issues.umbraco.org/issue/UAAS-648
When pushing content in other branches than master, all the deployments commands are run.
Is this necessary? As I understand, only changes to the masterbranch gets deployed. So this just adds some annoying waiting time, when pushing updates.
We will soon accommodate this. We are currently working on some features related to Deploy where we will implement this.
Sounds great, looking forward to this 👍
So this issue suddenly got a bit old ... What I expected to happen back in October didn't go in the direction we expected at the time, so the bits didn't get implemented along with Deploy.
I do however have a solution for this, which I can apply to any repository on Cloud. Just reach out if you want to try it out.
AB#687
Hi @skttl , going through some old issue reports. We are in the process of moving to an improved Cloud platform and that is going to be our main focus for the foreseeable future.
This feature request is really good and when we're done moving to the new platform we will need to work on making a good workflow for branching. There's a related issue to this as well, https://github.com/umbraco/Umbraco.Cloud.Issues/issues/37 which is an existing problem with branching as well. We'll group these types of issues together.
@sitereactor any news on this? Or can you share your solution? :)
Hi @skttl, I don't have a specific update on this one. However, we will soon start working on performance improvement in the deployment flow. Both within the Umbraco Deploy product as well as in deployment section of the platform itself. In this work, we will consider the possible to avoid running all commands when working on a feature branch.
Thanks for highlighting this.
I fiddled with the post-receive hook in kudu, if you change it to this:
#!/bin/sh
# Read input data from git
while read oldrev newrev refname
do
# Check if the branch being pushed is master
if [ "refs/heads/master" = "$refname" ]; then
# Record the push information to a file
echo "$oldrev $newrev $refname" > pushinfo
# Execute the deployment script only if it is the master branch
"$KUDU_EXE" "$KUDU_APPPATH" "$KUDU_MSBUILD" "$KUDU_DEPLOYER"
fi
done
it will only run the deployment command when pushing to master
Hi @skttl,
It looks like this issue has been around for quite a while, and there have been promises of it being reviewed and prioritized.
From the Platform perspective, it doesn’t make much sense for us to support multiple branching strategies in the Cloud repositories, because these repositories are mainly meant for deployments. This discussion falls into a bit of a gray area since git supports it, but the repositories are intended for deployments. We’re concerned we might run into limitations and unforeseen consequences if we try to work around how the deployment git repositories function.
For Umbraco Cloud, we recommend cloning the deployment repositories within your own git provider and integrating CI/CD into your workflows. This way, you can enjoy all the advanced branching strategies and development flows your heart desires!
Kind regards, @mclausen - Cloud Platform Team Lead