Add pipeline-owners-extraction pipeline (#3784)

* Add pipeline-owners-extraction pipeline
This commit is contained in:
Patrick Hallisey 2022-07-29 13:40:30 -07:00 коммит произвёл GitHub
Родитель a2a514be13
Коммит fb47586166
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 47 добавлений и 1 удалений

Просмотреть файл

@ -0,0 +1,42 @@
# Configure notifications in Azure DevOps
trigger: none
pr: none
stages:
- stage: Run
variables:
- template: ./templates/variables/globals.yml
jobs:
- job: Run
timeoutInMinutes: 120
pool:
name: azsdk-pool-mms-ubuntu-2004-general
vmImage: MMSUbuntu20.04
variables:
Organization: azure-sdk
Project: internal
DotNetDevOpsFeed: "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json"
OutputPath: '$(Agent.BuildDirectory)/pipelineOwners.json'
steps:
- task: DotNetCoreCLI@2
displayName: 'Install Pipeline Owners Extractor'
inputs:
command: custom
custom: 'tool'
arguments: 'install --global --add-source "$(DotNetDevOpsFeed)" --version "$(PipelineOwnersExtractorVersion)" "Azure.Sdk.Tools.PipelineOwnersExtractor"'
workingDirectory: '$(Agent.BuildDirectory)'
- task: AzureCLI@2
displayName: Run Pipeline Owners Extractor
inputs:
azureSubscription: 'Azure SDK Engineering System'
scriptType: pscore
scriptLocation: inlineScript
inlineScript: pipeline-owners-extractor --output "$(OutputPath)"
- publish: $(OutputPath)
displayName: Publish pipelineOwners artifact
artifact: pipelineOwners
condition: succeededOrFailed()

Просмотреть файл

@ -4,3 +4,4 @@ variables:
DotNetCoreVersion: '3.1.405'
NotificationsCreatorVersion: '1.0.0-dev.20220511.1'
CodeOwnersSubscriberVersion: '1.0.0-dev.20220302.2'
PipelineOwnersExtractorVersion: '1.0.0-dev.20220728.6'

Просмотреть файл

@ -1,4 +1,6 @@
using System;
using System.IO;
using System.Reflection;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
@ -6,7 +8,6 @@ using Azure.Sdk.Tools.NotificationConfiguration;
using Azure.Sdk.Tools.NotificationConfiguration.Helpers;
using Azure.Sdk.Tools.NotificationConfiguration.Services;
using Azure.Sdk.Tools.PipelineOwnersExtractor.Configuration;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
@ -23,6 +24,8 @@ namespace Azure.Sdk.Tools.PipelineOwnersExtractor
Console.WriteLine("Initializing PipelineOwnersExtractor");
using var host = Host.CreateDefaultBuilder(args)
// This affects config file loading and defaults to Directory.GetCurrentDirectory()
.UseContentRoot(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location))
.ConfigureServices((context, services) =>
{
services.AddSingleton<TokenCredential, DefaultAzureCredential>();