DEV Community

Sanjeevi Subramani
Sanjeevi Subramani

Posted on • Originally published at lkgforit.com on

Azure Devops Basics Part-3 | CI-CD pipeline for web Api and unit test execution in pipeline

Azure Devops Basics Part-3 YouTube Video

https://youtu.be/dGLWBWZavhw

YAML Pipeline created in this session:

# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml

trigger:
- main

pool:
  vmImage: ubuntu-latest

steps:

- task: DotNetCoreCLI@2
  displayName: Console app build
  inputs:
    command: 'build'
    projects: 'ConsoleAppTestBuild/ConsoleAppTestBuild/ConsoleAppTestBuild.csproj'
    arguments: 

- task: DotNetCoreCLI@2
  displayName: Web api app build
  inputs:
    command: 'build'
    projects: 'BasicWebapiUnitTest/BasicWebapiUnitTest/BasicWebapiUnitTest.csproj'

- task: DotNetCoreCLI@2
  displayName: Web api unit test build
  inputs:
    command: 'test'
    projects: 'BasicWebapiUnitTest/TestProjectBasicApi/TestProjectBasicApi.csproj'

Enter fullscreen mode Exit fullscreen mode

All the code used in the demo in below repo:

https://github.com/SSanjeevi/basicdevops

Top comments (0)