From 3453f8b8177e805aaa4c913506578e996daf13c1 Mon Sep 17 00:00:00 2001 From: Declan Smith Date: Fri, 6 Feb 2026 20:32:05 +1000 Subject: [PATCH 1/2] feat(workflows): simplify artifact handling and remove redundant tasks Will need to work out a better way of excluding artifacts when extending targets. --- .devops/workflows/Test_Devops_Build.yml | 36 --------------- .../Build/Definition/TargetDefinition.cs | 44 ------------------- _atom/Targets/IDeployTargets.cs | 11 +++-- 3 files changed, 8 insertions(+), 83 deletions(-) diff --git a/.devops/workflows/Test_Devops_Build.yml b/.devops/workflows/Test_Devops_Build.yml index bd6ab2fc..ca734386 100644 --- a/.devops/workflows/Test_Devops_Build.yml +++ b/.devops/workflows/Test_Devops_Build.yml @@ -277,42 +277,6 @@ jobs: artifact: DecSm.Atom.Tool-windows-latest path: "$(Build.ArtifactStagingDirectory)/DecSm.Atom.Tool" - - task: DownloadPipelineArtifact@2 - displayName: DecSm.Atom.Tool - inputs: - artifact: DecSm.Atom.Tool-windows-11-arm - path: "$(Build.ArtifactStagingDirectory)/DecSm.Atom.Tool" - - - task: DownloadPipelineArtifact@2 - displayName: DecSm.Atom.Tool - inputs: - artifact: DecSm.Atom.Tool-ubuntu-latest - path: "$(Build.ArtifactStagingDirectory)/DecSm.Atom.Tool" - - - task: DownloadPipelineArtifact@2 - displayName: DecSm.Atom.Tool - inputs: - artifact: DecSm.Atom.Tool-ubuntu-24.04-arm - path: "$(Build.ArtifactStagingDirectory)/DecSm.Atom.Tool" - - - task: DownloadPipelineArtifact@2 - displayName: DecSm.Atom.Tool - inputs: - artifact: DecSm.Atom.Tool-macos-15-intel - path: "$(Build.ArtifactStagingDirectory)/DecSm.Atom.Tool" - - - task: DownloadPipelineArtifact@2 - displayName: DecSm.Atom.Tool - inputs: - artifact: DecSm.Atom.Tool-macos-latest - path: "$(Build.ArtifactStagingDirectory)/DecSm.Atom.Tool" - - - task: DownloadPipelineArtifact@2 - displayName: DecSm.Atom.Tool - inputs: - artifact: DecSm.Atom.Tool-windows-latest - path: "$(Build.ArtifactStagingDirectory)/DecSm.Atom.Tool" - - task: DownloadPipelineArtifact@2 displayName: DecSm.Atom.Tool inputs: diff --git a/DecSm.Atom/Build/Definition/TargetDefinition.cs b/DecSm.Atom/Build/Definition/TargetDefinition.cs index 24318afb..18954874 100644 --- a/DecSm.Atom/Build/Definition/TargetDefinition.cs +++ b/DecSm.Atom/Build/Definition/TargetDefinition.cs @@ -298,17 +298,6 @@ public TargetDefinition ProducesArtifacts(IEnumerable artifactName, stri return this; } - /// - /// Clears all produced artifacts for the current target, ensuring it does not produce any artifacts. - /// - /// The current for fluent chaining. - public TargetDefinition ProducesNoArtifacts() - { - ProducedArtifacts.Clear(); - - return this; - } - /// /// Declares an artifact that this target consumes. /// @@ -377,17 +366,6 @@ public TargetDefinition ConsumesArtifacts( return this; } - /// - /// Clears all consumed artifacts for the current target, ensuring it does not depend on any external artifacts. - /// - /// The current for fluent chaining. - public TargetDefinition ConsumesNoArtifacts() - { - ConsumedArtifacts.Clear(); - - return this; - } - /// /// Declares a variable that this target produces. /// @@ -403,17 +381,6 @@ public TargetDefinition ProducesVariable(string variableName) return this; } - /// - /// Clears all produced variables for the current target, ensuring it does not produce any variables. - /// - /// The current for fluent chaining. - public TargetDefinition ProducesNoVariables() - { - ProducedVariables.Clear(); - - return this; - } - /// /// Declares a variable that this target consumes. /// @@ -426,15 +393,4 @@ public TargetDefinition ConsumesVariable(string targetName, string outputName) return this; } - - /// - /// Clears all consumed variables for the current target, ensuring it does not depend on any external variables. - /// - /// The current for fluent chaining. - public TargetDefinition ConsumesNoVariables() - { - ConsumedVariables.Clear(); - - return this; - } } diff --git a/_atom/Targets/IDeployTargets.cs b/_atom/Targets/IDeployTargets.cs index 6aa7c1a1..a896764d 100644 --- a/_atom/Targets/IDeployTargets.cs +++ b/_atom/Targets/IDeployTargets.cs @@ -37,9 +37,14 @@ await PushPackageToNuget( Target PushToNugetDevops => d => d - .Extends(x => x.PushToNuget) - .ConsumesNoArtifacts() - .ConsumesArtifact(nameof(IBuildTargets.PackTool), Projects.DecSm_Atom_Tool.Name, DevopsPlatformNames); + .DescribedAs("Pushes the packages to Nuget") + .RequiresParam(nameof(NugetFeed)) + .RequiresParam(nameof(NugetApiKey)) + .ConsumesVariable(nameof(SetupBuildInfo), nameof(BuildId)) + .ConsumesArtifacts(nameof(IBuildTargets.PackProjects), IBuildTargets.ProjectsToPack) + .ConsumesArtifact(nameof(IBuildTargets.PackTool), Projects.DecSm_Atom_Tool.Name, DevopsPlatformNames) + .DependsOn(nameof(ITestTargets.TestProjects)) + .Executes(() => Logger.LogInformation("Simulating push to Nuget feed")); Target PushToRelease => d => d From e21699001409d9528de62489710d1cafda0726a8 Mon Sep 17 00:00:00 2001 From: Declan Smith Date: Fri, 6 Feb 2026 20:36:21 +1000 Subject: [PATCH 2/2] fix(tests): Updated expected results --- ...iSurfaceTests.VerifyPublicApiSurface.verified.txt | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/DecSm.Atom.Tests/ApiSurfaceTests/PublicApiSurfaceTests.VerifyPublicApiSurface.verified.txt b/DecSm.Atom.Tests/ApiSurfaceTests/PublicApiSurfaceTests.VerifyPublicApiSurface.verified.txt index cf33c2db..9da7b44a 100644 --- a/DecSm.Atom.Tests/ApiSurfaceTests/PublicApiSurfaceTests.VerifyPublicApiSurface.verified.txt +++ b/DecSm.Atom.Tests/ApiSurfaceTests/PublicApiSurfaceTests.VerifyPublicApiSurface.verified.txt @@ -451,12 +451,6 @@ { Name: ConsumesArtifacts }, - { - Name: ConsumesNoArtifacts - }, - { - Name: ConsumesNoVariables - }, { Name: ConsumesVariable }, @@ -514,12 +508,6 @@ { Name: ProducesArtifacts }, - { - Name: ProducesNoArtifacts - }, - { - Name: ProducesNoVariables - }, { Name: ProducesVariable },