Skip to content
Merged
Show file tree
Hide file tree
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
42 changes: 42 additions & 0 deletions eng/pipelines/pipeline-owners-extraction.yml
Original file line number Diff line number Diff line change
@@ -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()
1 change: 1 addition & 0 deletions eng/pipelines/templates/variables/globals.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
using System;
using System.IO;
using System.Reflection;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
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;
Expand All @@ -23,6 +24,8 @@ public static async Task Main(string[] args)
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>();
Expand Down