A day with .Net

My day to day experince in .net

Build and deploy ASP.NET application to Azure via GitHub and Bamboo Server (CI\CD)

Posted by vivekcek on January 26, 2018

Bamboo Server is the choice of professional teams for continuous integration, deployment, and delivery.

In this post I will explain, How to configure Bamboo to build and deploy to Azure from GitHub repository.

1.This is how my git repo looks like.

2.When you clone this looks like as below. You can see my solution is actually inside a folder named “AzureSite”. When we configure our paths we need to consider this.

3.Now open your Bamboo Server, and create build plan. Fill the Project and build plan name section and “Link repository to new build plan.

4.Now in the Configure task section. First set your Source Code Checkout Task. Select the repository we connected in the previous step.

5.Now create a Script task to restore our nuget packages. Use the below script.

"C:\Program Files (x86)\NuGet\nuget.exe" restore "${bamboo.build.working.directory}\AzureSite\AzureSite.sln"

6.Now Add an MsBuild task as below.

7.Now create and Run the plan.

8.Now create an Artifacts for deployment. Please check the share checkbox.

9.Now create a deployment project.

10.Now create an environment.
11.Now Configure Artifact download task. Select the artifacts we create in step 8.

12.Now from azure download your publisher profile and import to your project.
13.Now add an MsBuild task for deploy. Use the below options

/p:Configuration=Debug /p:DeployOnBuild=True /p:PublishProfile="DeployToAzure" /p:ProfileTransformWebConfigEnabled=False /p:Password=PassworddFromDownloaded /p:AllowUntrustedCertificate=true

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s