0

I'm trying to find a good setup for continuous deployment single-page-apps on Windows Azure. Here are the constraints:

  • The source code is hosted on GitHub.
  • The application must be served on Windows Azure, either as a Web App or some other Azure service suitable for single-page-apps, that is, static html5-sites without a need for server-side processing.
  • I'm trying out various single-page-app architectures using a build technology based on NodeJS such as grunt or gulp to produce the final site.
  • I'm using WebStorm as the environment for the web development so any dependency to Visual Studio and MSBuild seems awkward in this context.
  • I want to setup continuous deployment in the cloud, i.e. every new commit should lead to an automatic build and deploy. Everyting should be automated in the cloud.

I have tried out the Continuous Deployment feature of Windows Azure Web Apps but I can't make the build process do what I want. Perhaps it is possible to tweak the build process, I'm not sure.

I have also looked into AppVeyor but that seems to be optimized for .NET projects using MSBuild as the build-platform.

I have started looking into travis-ci and circleci which seems promising.

I want to find the simplest and most natural approach using the latest technologies and cloud services. What can you recommend?

Nikola Schou
  • 2,386
  • 3
  • 23
  • 47

2 Answers2

0

I think the concept you are missing is the idea that you need to have a pipeline that delivers your code from one stage to the next.

This can all be done based on Github and Azure. This could be an example pipeline.

  • When you first commit a change it would be committed to the 'test' branch
  • A webhook in Github calls your Travis server, which will perform the build steps you require, and perform any preliminary testing. i.e. making sure it compiles etc.
  • The code is then merged with the staging branch.
  • Azure picks up the new code and deploys it to your staging Web App.
  • Another Github webhook fires initiating your functional and performance testing.
  • At that stage you may have a manual step to authorise deployment to production.
  • Then either automatically, or manually you merge the staging branch with the production branch and Azure automatically deploys.

This is obviously simplified, but it should give you somewhere to start thinking about the process you need to implement.

Michael B
  • 11,887
  • 6
  • 38
  • 74
  • Thank you for the answer. The pipeline I'm trying to build is a very simple one made for prototyping. Basically it is about one branch and one environment and a process like commit -> build + test -> deploy. I note that you bring in Travis and Github webhooks into the discussion as that might be a part of my solution so +1 for that. – Nikola Schou Jan 06 '16 at 12:59
0

If you want to continuous deployment for a HTML5 single-page-app without any server-side processing, I think it's not necessary for using a build technology of NodeJS to deploy a static html5 website.

You can try to create a HTML5 Empty Web App and set up deployment from source control to do it on Azure old portal, please see these pictures below and refer to the document https://azure.microsoft.com/en-us/documentation/articles/web-sites-publish-source-control/.

enter image description here

enter image description here

The option set up deployment from source control is at the right sidebar of the DASHBOARD tab page of your Web App on Azure old portal.

enter image description here

Then you can access the CMD of Kudu tool of your Azure WebApp at https://<your azure webapp name>.scm.azurewebsites.net/DebugConsole, and you can find these web files of your static html5 website at the path site/wwwroot. The picture below is my snapshot of the wwwroot directory of the HTML5 Empty Web Apps.

enter image description here

Any concern, please feel free to let me know.

Peter Pan
  • 23,476
  • 4
  • 25
  • 43
  • Thanks a lot for taking your time to give this answer. I do need a build process to prepare the static version of the web app. So your first observation (that I don't need a build process) is not correct. However, the rest of your comment is very valuable as it suggested to me how I can modify the build process so +1 for that. – Nikola Schou Jan 06 '16 at 12:53
  • @NikolaSchou It seems that you can try to use `Visual Studio Team Services`, please see https://www.visualstudio.com/get-started/overview-of-get-started-tasks-vs. And about build and deploy NodeJS App to an Azure WebApp, you can refer to this doc https://msdn.microsoft.com/Library/vs/alm/Build/azure/nodejs. – Peter Pan Jan 07 '16 at 05:16