Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync eng/common directory with azure-sdk-tools for PR 7251 #1646

Merged
merged 3 commits into from
Nov 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions eng/common/pipelines/codeowners-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Lint the CODEOWNERS file for a given repository and filter out baseline errors
# Note: Due to the nature of the verifications, which includes source paths/globs
# for the repository, this pipeline cannot use sparse-checkout.
trigger: none

pr:
branches:
include:
- main
- feature/*
- hotfix/*
- release/*
paths:
include:
- .github/CODEOWNERS
- .github/CODEOWNERS_baseline_errors.txt
- eng/common/pipelines/codeowners-linter.yml

stages:
- stage: Run
variables:
skipComponentGovernanceDetection: true

jobs:
- job: Run
timeoutInMinutes: 120
pool:
name: azsdk-pool-mms-ubuntu-2204-general
vmImage: ubuntu-22.04

variables:
CodeownersLinterVersion: '1.0.0-dev.20231107.2'
DotNetDevOpsFeed: "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json"
RepoLabelUri: "https://azuresdkartifacts.blob.core.windows.net/azure-sdk-write-teams/repository-labels-blob"
TeamUserUri: "https://azuresdkartifacts.blob.core.windows.net/azure-sdk-write-teams/azure-sdk-write-teams-blob"
UserOrgUri: "https://azuresdkartifacts.blob.core.windows.net/azure-sdk-write-teams/user-org-visibility-blob"

steps:
- task: DotNetCoreCLI@2
displayName: 'Install CodeownersLinter'
inputs:
command: custom
custom: 'tool'
arguments: 'install --global --add-source "$(DotNetDevOpsFeed)" --version "$(CodeownersLinterVersion)" "Azure.Sdk.Tools.CodeownersLinter"'
- pwsh: |
codeowners-linter --repoRoot $(Build.SourcesDirectory) --repoName $(Build.Repository.Name) -fbl -rUri "$(RepoLabelUri)" -tUri "$(TeamUserUri)" -uUri "$(UserOrgUri)"
displayName: 'Lint CODEOWNERS and filter using baseline'