Monday, February 11, 2019

Build Pipelines in Azure DevOps - How to build pipelines for Java WebApp and migrate to Azure

Building pipelines in Azure DevOps is really easy, you can migrate your application code from any where into Azure using Azure pipelines.


You need to create an account by clicking on below URL:

Once you sign in, you need to create a project.

Create App service on Azure portal
What is App service?

Azure App Service enables you to build and host web apps, mobile back ends, and RESTful APIs in the programming language of your choice without managing infrastructure. It offers auto-scaling and high availability, supports both Windows and Linux, and enables automated deployments from GitHub, Azure DevOps, or any Git repo.

How to create an app service in Azure Portal?

1. Go to Azure portal -

2. Click on Create App services, create app service.

3. Enter WebApp details
Select subscription as free trial.
Resource group as some name
Name should be unique
Publish - Code
Run time stack --> Choose Tomcat 8.5 under Java 8
Operation System as Linux
Region as Central

4. Select App service plan as it is shown
Select sku and size
Choose Dev/Test and select B1 and click apply

Click on Review and Create and click on Create

Now this should have created a WebApp
Now go to App services, Click on WebApp, click on URL and make sure WebApp is up and running.

Steps for creating pipelines in Azure Devops
1. Click on Pipelines, Builds.

2. Click on New pipeline

3. Select source repository - it could be your Bitbucket or Azure Repo and click continue

4. If your application is Java stack, type Java and Choose Azure WebApp for Java

5. Click on pipeline name and re-name per your naming standard

6. Modify maven goal as clean install

7. Click on Stop Azure WebApp step, Enter Azure WebApp details - where  you would like to deploy your app in Azure.

8. Do the same in Deploy Azure WebApp & Start Azure WebApp steps.

9. Now click on Save and Queue.

10. This should kick start build,