forked from microsoftgraph/microsoft-graph-docs-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
apidoctor.validation.yml
77 lines (65 loc) · 1.98 KB
/
apidoctor.validation.yml
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
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# Pipeline for validating Microsoft Graph docs using API Doctor
trigger:
branches:
include:
- live
- main
paths:
include:
- api-reference/*
pr:
branches:
include:
- live
- main
paths:
include:
- api-reference/*
pool:
vmImage: 'windows-latest'
parameters:
- name: useNuGetPackage
displayName: "Use API Doctor NuGet Package (If disabled, source code from GitHub will be used)?"
type: boolean
default: true
- name: apiDoctorNuGetVersion
default: "1.2.2312.152"
displayName: "API Doctor NuGet Package Version"
- name: apiDoctorGitRepoUrl
default: "https://github.com/OneDrive/apidoctor.git"
displayName: "API Doctor Git Repo URL"
- name: apiDoctorGitBranch
default: "master"
displayName: "API Doctor Git branch"
steps:
- checkout: self
displayName: 'Checkout Microsoft Graph docs'
clean: true
fetchDepth: 1
- task: UseDotNet@2
displayName: 'Use .NET Core SDK 6.x'
inputs:
version: 6.x
- task: PowerShell@2
displayName: 'Run API Doctor Script'
env:
USE_NUGET_PACKAGE: ${{ parameters.useNuGetPackage }}
API_DOCTOR_NUGET_VERSION: ${{ parameters.apiDoctorNuGetVersion }}
API_DOCTOR_GIT_REPO_URL: ${{ parameters.apiDoctorGitRepoUrl }}
API_DOCTOR_GIT_BRANCH: ${{ parameters.apiDoctorGitBranch }}
inputs:
filePath: Test-Docs.ps1
arguments: -cleanUp
script: |
Write-Host "Executing API Doctor script with the following parameters:"
if($env:USE_NUGET_PACKAGE -eq 'True') {
Write-Host " - API Doctor NuGet Version: $($env:API_DOCTOR_NUGET_VERSION)"
}
else
{
Write-Host "API Doctor Git Repo:"
Write-Host "- URL: $($env:API_DOCTOR_GIT_REPO_URL)"
Write-Host "- Branch: $($env:API_DOCTOR_GIT_BRANCH)"
}