-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathanalyze.yml
More file actions
122 lines (99 loc) · 4.69 KB
/
analyze.yml
File metadata and controls
122 lines (99 loc) · 4.69 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
parameters:
Artifacts: []
ServiceDirectory: not-specified
TestPipeline: false
steps:
- template: /eng/common/pipelines/templates/steps/save-package-properties.yml
parameters:
ServiceDirectory: ${{parameters.ServiceDirectory}}
- template: /eng/pipelines/templates/steps/set-artifact-packages.yml
parameters:
PackageInfo: $(Build.ArtifactStagingDirectory)/PackageInfo
Artifacts: ${{ parameters.Artifacts }}
- template: /eng/common/pipelines/templates/steps/check-spelling.yml
- task: PowerShell@2
inputs:
targetType: 'filePath'
filePath: eng/scripts/spell-check-public-apis.ps1
arguments: -ChangedServices "$(ChangedServices)"
pwsh: true
displayName: Spell check public API
- template: /eng/common/pipelines/templates/steps/set-test-pipeline-version.yml
parameters:
PackageName: "@azure/template"
ServiceDirectory: "template"
TestPipeline: ${{ parameters.TestPipeline }}
- template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml
parameters:
ArtifactPath: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'package-diffs'
SbomEnabled: false
- template: /eng/common/pipelines/templates/steps/verify-readmes.yml
parameters:
PackagePropertiesFolder: $(Build.ArtifactStagingDirectory)/PackageInfo
- template: /eng/common/pipelines/templates/steps/verify-path-length.yml
parameters:
SourceDirectory: $(Build.SourcesDirectory)
- template: /eng/common/pipelines/templates/steps/verify-links.yml
parameters:
${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
Directory: ""
Urls: (eng/common/scripts/get-markdown-files-from-changed-files.ps1)
${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
Directory: sdk/${{ parameters.ServiceDirectory }}
CheckLinkGuidance: $true
- template: /eng/common/pipelines/templates/steps/verify-samples.yml
parameters:
ServiceDirectories: $(ChangedServicesCsv)
- script: |
npm ci
workingDirectory: $(System.DefaultWorkingDirectory)/eng/tools/analyze-deps
displayName: "Install tool dependencies"
- script: |
node index.js --verbose --dump "$(Build.ArtifactStagingDirectory)/data.js" --out "$(Build.ArtifactStagingDirectory)/dependencies.html"
workingDirectory: $(System.DefaultWorkingDirectory)/eng/tools/analyze-deps
displayName: "Analyze library dependencies"
- script: |
node common/scripts/install-run-rush.js install
displayName: "Install dependencies"
- script: |
node eng/tools/rush-runner.js build $(ChangedServices) -packages "$(ArtifactPackageNames)" --verbose -p max
displayName: "Build libraries"
- template: /eng/pipelines/templates/steps/run-eslint.yml
parameters:
ServiceDirectories: $(ChangedServices)
- pwsh: |
node eng/tools/rush-runner.js check-format $(ChangedServices) -packages "$(ArtifactPackageNames)" --verbose
displayName: "Check Format in Libraries"
- script: |
node eng/tools/rush-runner.js audit $(ChangedServices) -packages "$(ArtifactPackageNames)"
condition: and(succeeded(), eq(variables['RunNpmAudit'], 'true'))
displayName: "Audit libraries"
- template: /eng/common/pipelines/templates/steps/verify-changelogs.yml
parameters:
PackagePropertiesFolder: $(Build.ArtifactStagingDirectory)/PackageInfo
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
# ComponentGovernance is currently unable to run on pull requests of public projects. Running on non-PR
# builds should be sufficient.
condition: and(succeededOrFailed(), ne(variables['Build.Reason'], 'PullRequest'))
displayName: "Component Detection"
# Unlink node_modules folders to significantly improve performance of subsequent tasks
# which need to walk the directory tree (and are hardcoded to follow symlinks).
- script: |
node eng/tools/rush-runner.js unlink
displayName: "Unlink dependencies"
# It's important for performance to pass "sdk" as "sourceFolder" rather than as a prefix in "contents".
# The task first enumerates all files under "sourceFolder", then matches them against the "contents" pattern.
- task: CopyFiles@2
inputs:
sourceFolder: sdk
contents: "**/**/*lintReport.html"
targetFolder: $(Build.ArtifactStagingDirectory)
flattenFolders: true
displayName: "Copy lint reports"
- template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml
parameters:
ArtifactPath: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'reports'
SbomEnabled: false
- template: /eng/common/pipelines/templates/steps/eng-common-workflow-enforcer.yml