Friday, February 2, 2018

How to create CICD pipelines or build definitions in VSTS - Create CICD Pipelines using Azure DevOps

How to configure CI/build pipeline in VSTS?
Lets us see the steps for creating CICD pipeline using VSTS or Azure DevOps.
Login to VSTS, choose project dashboard.
Go to Pipelines
Click on builds.

Click on new Build pipelines

Choose Bitbucket as a source

Click on  Change, New service connection. Click on username and password.
enter bitbucket user name and password. Click on Authorize.

Choose the repository. Click Continue.

Now choose a template by entering Java in the search textbook.

Select “Azure Web App for Java” template, Click Apply.
Now click on Agent queue, select Hosted.
Click on get sources. Select Git repo, branch as master. 
Click on Maven pom.xml task and select the maven pom.xml by clicking on three dots …make sure you change to MyWebApp/pom.xml
goal should be clean install
Leave the default value in copy files to staging folder
Leave the default value in publish artifact :drop
Click on Stop azure web app
Enter Azure subscription.

Select Free trial subscription from the drop down.
Click on authorize

Create App service on Azure portal
Now to login
click on App services

Click on + Add
Click on Web App.
Enter App service name(it should be unique)
Create a new resource group(for first time if you create an app service, otherwise you can use existing group name)

Select azure free subscription

Leave the rest default click save/create

Save and try to access the app service url by going to overview section of app service.

After you see the app service home page, come back to VSTS
Choose the app service name from the drop down.
Do the same thing Deploy Azure WebApp and Start Azure Web App task.
Now click on Triggers to enable Continuous integration enabled so it builds for every check-in.

Click on Save & Queue to kick start the build.

No comments:

Post a Comment