Skip to content

Commit dd478f9

Browse files
Sync eng/common directory with azure-sdk-tools for PR 7251 (Azure#21908)
* Add CODEOWNERS linter yml file to eng/common/pipelines * Add filter baseline option to run command line * Update version of linter to 1.0.0-dev.20231107.2 which will install correctly --------- Co-authored-by: James Suplizio <jasupliz@microsoft.com>
1 parent 758e360 commit dd478f9

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Lint the CODEOWNERS file for a given repository and filter out baseline errors
2+
# Note: Due to the nature of the verifications, which includes source paths/globs
3+
# for the repository, this pipeline cannot use sparse-checkout.
4+
trigger: none
5+
6+
pr:
7+
branches:
8+
include:
9+
- main
10+
- feature/*
11+
- hotfix/*
12+
- release/*
13+
paths:
14+
include:
15+
- .github/CODEOWNERS
16+
- .github/CODEOWNERS_baseline_errors.txt
17+
- eng/common/pipelines/codeowners-linter.yml
18+
19+
stages:
20+
- stage: Run
21+
variables:
22+
skipComponentGovernanceDetection: true
23+
24+
jobs:
25+
- job: Run
26+
timeoutInMinutes: 120
27+
pool:
28+
name: azsdk-pool-mms-ubuntu-2204-general
29+
vmImage: ubuntu-22.04
30+
31+
variables:
32+
CodeownersLinterVersion: '1.0.0-dev.20231107.2'
33+
DotNetDevOpsFeed: "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json"
34+
RepoLabelUri: "https://azuresdkartifacts.blob.core.windows.net/azure-sdk-write-teams/repository-labels-blob"
35+
TeamUserUri: "https://azuresdkartifacts.blob.core.windows.net/azure-sdk-write-teams/azure-sdk-write-teams-blob"
36+
UserOrgUri: "https://azuresdkartifacts.blob.core.windows.net/azure-sdk-write-teams/user-org-visibility-blob"
37+
38+
steps:
39+
- task: DotNetCoreCLI@2
40+
displayName: 'Install CodeownersLinter'
41+
inputs:
42+
command: custom
43+
custom: 'tool'
44+
arguments: 'install --global --add-source "$(DotNetDevOpsFeed)" --version "$(CodeownersLinterVersion)" "Azure.Sdk.Tools.CodeownersLinter"'
45+
- pwsh: |
46+
codeowners-linter --repoRoot $(Build.SourcesDirectory) --repoName $(Build.Repository.Name) -fbl -rUri "$(RepoLabelUri)" -tUri "$(TeamUserUri)" -uUri "$(UserOrgUri)"
47+
displayName: 'Lint CODEOWNERS and filter using baseline'

0 commit comments

Comments
 (0)