We've recently had an Umbraco Cloud site built for us by an agency which we're now taking in house and as such I've recently setup the appropriate Bitbucket repository alongside the Umbraco Cloud git repo.
I'm struggling to understand how a normal pull request workflow fits into the picture. I currently have the C# code in the Bitbucket repo and hence a pull request can take place there - but how would you then look to take the build output (DLL) and get that into the Umbraco repository. And on top of that, if we wanted to pull the JS/CSS/Views into the Bitbucket repository, we'd need a way of moving those into the right place at build/deploy time.
You'd also have the problem that if a user updates a template (or anything else) via the dev/staging backoffice then those changes would be lost on next deployment, as they wouldn't make their way into the Bitbucket repository.
The Umbraco git model seems to work well for simple uses cases but for a larger development team, it doesn't seem to fit into a common enterprise engineering workflow.
We had the same problem with 2 repos, one for code and another - Umbraco Cloud, if customer will change code in Umbraco Cloud - don't know solution for a such situation.
In the end we opted for a remote mirror (Bitbucket) of the Umbraco Cloud repository. That's where our developers clone and work with the code, meaning they can run/debug locally and create pull requests into a master branch.
From there, everytime something is merged into master, our build system Jenkins syncs/pushes the code to the Umbraco Cloud repository. Occasionally, there's a conflict, if for example Umbraco has been updated or a new user was added. To resolve that, the user must branch from bitbucket/master and merge in the remote changes. That is then PR'd back into bitbucket/master and Jenkins runs again.
We also have a second Jenkins job which watches for any branches called deploy/*, e.g. deploy/new-homepage, and that gets automatically deployed to a box in our Azure lab. The user can then login there, restore from dev/live and send it to a colleague/manager for a visual review & feedback.
Took a bit of setting up but decent flow in the end and gave us the PR process we needed. Drop me a line on dave.clarke[at]squaredup.com if you've got any questions!
We use Jenkins internally for lots of build jobs, so I setup a job there using the Git Publisher plugin.
Using the built-in source code management, Jenkins watches the Bitbucket repository for changes, pulls them down when it detects any and then pushes to the remote Umbraco Cloud repository (development site) using the Git Publisher.
Pull request workflow
We've recently had an Umbraco Cloud site built for us by an agency which we're now taking in house and as such I've recently setup the appropriate Bitbucket repository alongside the Umbraco Cloud git repo.
I'm struggling to understand how a normal pull request workflow fits into the picture. I currently have the C# code in the Bitbucket repo and hence a pull request can take place there - but how would you then look to take the build output (DLL) and get that into the Umbraco repository. And on top of that, if we wanted to pull the JS/CSS/Views into the Bitbucket repository, we'd need a way of moving those into the right place at build/deploy time.
You'd also have the problem that if a user updates a template (or anything else) via the dev/staging backoffice then those changes would be lost on next deployment, as they wouldn't make their way into the Bitbucket repository.
The Umbraco git model seems to work well for simple uses cases but for a larger development team, it doesn't seem to fit into a common enterprise engineering workflow.
Any thoughts? What is everyone else doing?
Hi Dave
We had the same problem with 2 repos, one for code and another - Umbraco Cloud, if customer will change code in Umbraco Cloud - don't know solution for a such situation.
Did you find out how to handle it?
Thanks,
Alex
In the end we opted for a remote mirror (Bitbucket) of the Umbraco Cloud repository. That's where our developers clone and work with the code, meaning they can run/debug locally and create pull requests into a master branch.
From there, everytime something is merged into master, our build system Jenkins syncs/pushes the code to the Umbraco Cloud repository. Occasionally, there's a conflict, if for example Umbraco has been updated or a new user was added. To resolve that, the user must branch from bitbucket/master and merge in the remote changes. That is then PR'd back into bitbucket/master and Jenkins runs again.
We also have a second Jenkins job which watches for any branches called deploy/*, e.g. deploy/new-homepage, and that gets automatically deployed to a box in our Azure lab. The user can then login there, restore from dev/live and send it to a colleague/manager for a visual review & feedback.
Took a bit of setting up but decent flow in the end and gave us the PR process we needed. Drop me a line on dave.clarke[at]squaredup.com if you've got any questions!
Hi Dave,
So you actually push the Umbraco Cloud repository to your own repo as well.
Seems like a good option. Only thing we need to set up is the automated deployment to Umbraco Cloud.
Dave
Dave,
Maybe you can share how did you set up pushing the umbraco cloud stuff to your own repo ?
Dave
Hi Dave,
We use Jenkins internally for lots of build jobs, so I setup a job there using the Git Publisher plugin.
Using the built-in source code management, Jenkins watches the Bitbucket repository for changes, pulls them down when it detects any and then pushes to the remote Umbraco Cloud repository (development site) using the Git Publisher.
Does that help?
Cheers,
Dave
Hi Dave,
We use VS to develop Umbraco Cloud websites like described here : https://our.umbraco.org/documentation/Umbraco-Cloud/Set-Up/Visual-Studio/
So we have 2 git repositories. One with VS solution which we push to our github account. And the other one which is pushed to Umbraco Cloud.
How did you add the second one to your Bitbucket account. Also as a seperate repo...or did you include it in the one for the VS solution ?
Or do you use a different approach ?
Dave
You can add a new "remote" to the Umbraco repository, which can be a Bitbucket repo.
You then need a manual/automated way of syncing the changes.
Does that make sense?
is working on a reply...