Prerequisites: Service Connection in DevOps and App Service in Azure Directory
Service Connection in Azure DevOps:
Follow the blog ‘https://helicaltech.com/create-service-connection-azure-devops/’ to create service connection in Azure DevOps
App Service in Azure Directory: Follow the blog ‘https://helicaltech.com/create-a-app-service-in-azure-directory/’ to create app service in Azure Directory
Pipeline in DevOps: Pipeline used to deploy project
Follow below steps to create a pipeline:
- Login to Azure DevOps
- Select a Project
- Click on Pipelines which is present in left side menu
- Click on New Pipeline.
- Select Azure Reports Git in the Connect tab
- Select a git repository in which Java Maven project is present
- Select Starter pipeline in Configure tab
- A new YAML will open to add the steps to deploy java maven app into Azure
- Follow the below process to add the list of steps
- 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
- Search Maven in the list of tasks available on the right, choose Maven
- Enter the goal as ‘clean package’, this will clean the maven project and build the package
- Uncheck the option to run JUnit test results
- Click on Add
- New step will be added in the script
- Azure WebApp Deployment task:
This step is used to deploy the maven build into Azure Directory as app service
- Search Azure in the list of tasks available on the right, choose Azure App service deploy task
- Select the Azure Resource Manager as Connection type
- Choose the service connection in Azure subscription (Service connection is the connection between Azure DevOps and Azure Directory)
- Select the Web App on Windows as App Service type
- Select the App Service
- 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
- 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:
- Service Connection
2. Pipeline
Thank You,
Ramu Vudugula.
Best Open Source Business Intelligence Software Helical Insight is Here