From d51c0acee92763e2f396eeb05b21333605d210ba Mon Sep 17 00:00:00 2001 From: Logan Bussell Date: Fri, 16 May 2025 16:47:40 -0700 Subject: [PATCH 1/7] Add stub of new staging pipeline command --- .../FromStagingPipelineCommand.cs | 23 ++++++++++++++++ .../FromStagingPipelineOptions.cs | 27 +++++++++++++++++++ eng/update-dependencies/Program.cs | 4 +++ 3 files changed, 54 insertions(+) create mode 100644 eng/update-dependencies/FromStagingPipelineCommand.cs create mode 100644 eng/update-dependencies/FromStagingPipelineOptions.cs diff --git a/eng/update-dependencies/FromStagingPipelineCommand.cs b/eng/update-dependencies/FromStagingPipelineCommand.cs new file mode 100644 index 0000000000..122341f268 --- /dev/null +++ b/eng/update-dependencies/FromStagingPipelineCommand.cs @@ -0,0 +1,23 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; + +namespace Dotnet.Docker; + +internal class FromStagingPipelineCommand( + ILogger logger) + : BaseCommand +{ + private readonly ILogger _logger = logger; + + public override async Task ExecuteAsync(FromStagingPipelineOptions options) + { + _logger.LogInformation( + "Processing staging pipeline run with ID {options.StagingPipelineRunId}", + options.StagingPipelineRunId); + + return 0; // Return success for now + } +} diff --git a/eng/update-dependencies/FromStagingPipelineOptions.cs b/eng/update-dependencies/FromStagingPipelineOptions.cs new file mode 100644 index 0000000000..d9bc7c3f73 --- /dev/null +++ b/eng/update-dependencies/FromStagingPipelineOptions.cs @@ -0,0 +1,27 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Collections.Generic; +using System.CommandLine; + +namespace Dotnet.Docker; + +internal class FromStagingPipelineOptions : CreatePullRequestOptions, IOptions +{ + public required string StagingPipelineRunId { get; init; } + + public static new List Arguments { get; } = + [ + new Argument("stagingPipelineRunId") + { + Arity = ArgumentArity.ExactlyOne, + Description = "The staging pipeline run ID to use as a source for the update" + }, + ..CreatePullRequestOptions.Arguments, + ]; + + public static new List