-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
86 lines (78 loc) · 2.59 KB
/
azure-pipelines.yml
File metadata and controls
86 lines (78 loc) · 2.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# ASP.NET Core (.NET Framework)
# Build and test ASP.NET Core projects targeting the full .NET Framework.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
trigger:
# GitHub only: (Use Branch Policies in ADO to configure which pipeline to execute)
pr:
- master
paths:
include:
- apis/poi
pool:
vmImage: 'ubuntu-latest'
# vmImage: 'windows-latest'
steps:
- task: UseDotNet@2
displayName: 'Install .NET Core SDK'
inputs:
version: 3.1.x
- task: DotNetCoreCLI@2
displayName: Restore
inputs:
command: restore
projects: 'apis/**/**/*.csproj'
- task: DotNetCoreCLI@2
displayName: Build
inputs:
command: build
projects: 'apis/**/**/*.csproj'
arguments: '--configuration Release' # Update this to match your need
- task: DotNetCoreCLI@2
displayName: 'dotnet test'
inputs:
command: test
projects: 'apis/**/**/UnitTests.csproj' # This works
#projects: 'apis/**/tests/**/*.csproj' # One test fails with this.
arguments: '--configuration $(buildConfiguration)'
# Tasks to publish, archive files and publish the artifacts:
#- task: DotNetCoreCLI@2
# inputs:
# command: publish
# arguments: '--configuration Release --output $(build.artifactStagingDirectory)/publish_output'
# projects: 'apis/**/web/*.csproj'
# publishWebProjects: false
# modifyOutputPath: true
# zipAfterPublish: false
#
#- task: ArchiveFiles@2
# displayName: "Archive files"
# inputs:
# rootFolderOrFile: "$(build.artifactStagingDirectory)/publish_output/"
# includeRootFolder: false
# archiveFile: "$(build.artifactStagingDirectory)/WebApp.zip"
#- task: PublishBuildArtifacts@1
# inputs:
# PathtoPublish: '$(build.artifactStagingDirectory)/WebApp.zip'
# artifactName: 'WebApp'
# This only works on Windows: (But it has a lot of information out of the box!)
# For more information go to:
# https://marketplace.visualstudio.com/items?itemName=AmanBedi18.CreateBugTask
#- task: CreateBug@2
# inputs:
# isyamlpipeline: true
# custompaths: false
# customrequestor: false
# condition: failed()
# env:
# SYSTEM_ACCESSTOKEN: $(System.AccessToken)
# Create or update a work item: (Might need more details on the body)
# For more information go to:
# https://marketplace.visualstudio.com/items?itemName=mspremier.CreateWorkItem
- task: CreateWorkItem@1
displayName: 'Create Bug on Failure'
inputs:
workItemType: bug
iterationPath: '@CurrentIteration'
title: Azure Pipeline $(Build.DefinitionName) failed against build $(Build.BuildNumber)
condition: failed()