Create a Pipeline in DevOps to deploy Java Maven project into Azure Directory as App Service

Posted on by By admin, in Services | 0

Prerequisites: Service Connection in DevOps and App Service in Azure Directory

Service Connection in Azure DevOps:

Follow the blog ‘’ to create service connection in Azure DevOps

App Service in Azure Directory: Follow the blog ‘’ to create app service in Azure Directory

Pipeline in DevOps: Pipeline used to deploy project

Follow below steps to create a pipeline:

  1. Login to Azure DevOps
  2. Select a Project
  3. Click on Pipelines which is present in left side menu
  4. Click on New Pipeline.
  5. Select Azure Reports Git in the Connect tab
  6. Select a git repository in which Java Maven project is present
  7. Select Starter pipeline in Configure tab
  8. A new YAML will open to add the steps to deploy java maven app into Azure
  9. Follow the below process to add the list of steps
  1. Git Repo:

Select the git repo branch to trigger. This step will take git repo from the mentioned branch to trigger the process

Eg: master, dev or any other branch

  • vmImage:

This step is used to configure the virtual machine to run the job

  • Maven task:

This step is used to build the maven package with the specified goal using the pom.xml file

  1. Search Maven in the list of tasks available on the right, choose Maven
  2. Enter the goal as ‘clean package’, this will clean the maven project and build the package
  3. Uncheck the option to run JUnit test results
  4. Click on Add
  5. New step will be added in the script
  1. Azure WebApp Deployment task:

This step is used to deploy the maven build into Azure Directory as app service

  1. Search Azure in the list of tasks available on the right, choose Azure App service deploy task
  2. Select the Azure Resource Manager as Connection type
  3. Choose the service connection in Azure subscription (Service connection is the connection between Azure DevOps and Azure Directory)
  4. Select the Web App on Windows as App Service type
  5. Select the App Service
  6. Enter the file name in Package or folder option. In the pom.xml we have configured to build the project as JAR file so here we have to add the same JAR file name
  7. Click on Add, new step will be added in the script

Save and run the pipeline. After pipeline run completed successfully we can see Java Maven project deployed into Azure directory as App service. Run the app service to load the process

Flow Diagram:

  1. Service Connection

2. Pipeline

Thank You,
Ramu Vudugula.


Best Open Source Business Intelligence Software Helical Insight is Here


A Business Intelligence Framework

0 0 votes
Article Rating
Notify of
Inline Feedbacks
View all comments