From 029068e22911173029f2ba1bd272f19b810206de Mon Sep 17 00:00:00 2001 From: Paul Higinbotham Date: Mon, 4 May 2020 14:12:23 -0700 Subject: [PATCH 1/2] Add CI release/publish to RemotingTools, SecretManagement, ThreadJob modules --- .../.ci/ci.yml | 7 ++- .../.ci/release.yml | 23 +++++-- .../build.ps1 | 18 +++++- .../.ci/ci.yml | 7 ++- .../.ci/release.yml | 23 +++++-- .../build.ps1 | 60 +++++++++---------- .../pspackageproject.json | 1 + .../Microsoft.PowerShell.ThreadJob/.ci/ci.yml | 7 ++- .../.ci/release.yml | 23 +++++-- .../Microsoft.PowerShell.ThreadJob/build.ps1 | 60 +++++++++---------- .../pspackageproject.json | 1 + 11 files changed, 142 insertions(+), 88 deletions(-) diff --git a/Modules/Microsoft.PowerShell.RemotingTools/.ci/ci.yml b/Modules/Microsoft.PowerShell.RemotingTools/.ci/ci.yml index 40e9495..c9022eb 100644 --- a/Modules/Microsoft.PowerShell.RemotingTools/.ci/ci.yml +++ b/Modules/Microsoft.PowerShell.RemotingTools/.ci/ci.yml @@ -56,10 +56,11 @@ stages: Install-Module -Name PSPackageProject -Force $config = Get-PSPackageProjectConfiguration $signSrcPath = "$($config.BuildOutputPath)\$($config.ModuleName)" - $signOutPath = "$($config.BuildOutputPath)\$($config.ModuleName)\Signed" + $signOutPath = "$($config.SignedOutputPath)\$($config.ModuleName)" if (! (Test-Path -Path $signOutPath)) { $null = New-Item -Path $signOutPath -ItemType Directory } + Write-Host "Signed output path is: $signOutPath" $vstsCommandString = "vso[task.setvariable variable=signSrcPath]${signSrcPath}" Write-Host "sending " + $vstsCommandString Write-Host "##$vstsCommandString" @@ -88,6 +89,10 @@ stages: binVersionOverride: '' condition: and(and(succeeded(), eq(variables['Build.Reason'], 'Manual')), ne(variables['SkipSigning'], 'True')) + - pwsh: | + $(Build.SourcesDirectory)/build.ps1 -Publish -Signed + displayName: Create signed artifact + - stage: Compliance displayName: Compliance dependsOn: Build diff --git a/Modules/Microsoft.PowerShell.RemotingTools/.ci/release.yml b/Modules/Microsoft.PowerShell.RemotingTools/.ci/release.yml index 650d624..3dfc390 100644 --- a/Modules/Microsoft.PowerShell.RemotingTools/.ci/release.yml +++ b/Modules/Microsoft.PowerShell.RemotingTools/.ci/release.yml @@ -1,23 +1,34 @@ parameters: jobName: release imageName: windows-2019 - displayName: Release + displayName: 'Release Microsoft.PowerShell.RemotingTools to NuGet' jobs: - job: ${{ parameters.jobName }} pool: vmImage: ${{ parameters.imageName }} displayName: ${{ parameters.displayName }} + steps: - task: DownloadBuildArtifacts@0 displayName: 'Download artifacts' inputs: buildType: current - downloadType: single - artifactName: NuPkg + downloadType: specific + itemPattern: '**/*.nupkg' downloadPath: '$(System.ArtifactsDirectory)' + - task: NuGetToolInstaller@1 displayName: 'Install NuGet' - - pwsh: | - nuget push $(System.ArtifactsDirectory)\nupkg\*.nupkg -ApiKey $(NuGetApiKey) -Source https://www.powershellgallery.com/api/v2/package/ -NonInteractive - displayName: Publish Package + + - powershell: | + Get-ChildItem '$(Build.ArtifactStagingDirectory)/Microsoft.PowerShell.RemotingTools.*.nupkg' + displayName: 'Capture NuGet package' + + - task: NuGetCommand@2 + displayName: 'Push PSThreadJob artifacts to AzArtifactsFeed' + inputs: + command: push + packagesToPush: '$(System.ArtifactsDirectory)/Microsoft.PowerShell.RemotingTools.*.nupkg' + nuGetFeedType: external + publishFeedCredentials: AzArtifactFeed diff --git a/Modules/Microsoft.PowerShell.RemotingTools/build.ps1 b/Modules/Microsoft.PowerShell.RemotingTools/build.ps1 index d68da86..e374464 100644 --- a/Modules/Microsoft.PowerShell.RemotingTools/build.ps1 +++ b/Modules/Microsoft.PowerShell.RemotingTools/build.ps1 @@ -1,6 +1,8 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. +# Do NOT edit this file. Edit dobuild.ps1 +[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingWriteHost", "")] param ( [Parameter(ParameterSetName="build")] [switch] @@ -10,6 +12,14 @@ param ( [switch] $Build, + [Parameter(ParameterSetName="publish")] + [switch] + $Publish, + + [Parameter(ParameterSetName="publish")] + [switch] + $Signed, + [Parameter(ParameterSetName="build")] [switch] $Test, @@ -29,6 +39,7 @@ $config = Get-PSPackageProjectConfiguration -ConfigPath $PSScriptRoot $script:ModuleName = $config.ModuleName $script:SrcPath = $config.SourcePath $script:OutDirectory = $config.BuildOutputPath +$script:SignedDirectory = $config.SignedOutputPath $script:TestPath = $config.TestPath $script:ModuleRoot = $PSScriptRoot @@ -100,7 +111,12 @@ else if ($Build.IsPresent) { $sb = (Get-Item Function:DoBuild).ScriptBlock - Invoke-PSPackageProjectBuild -BuildScript $sb + Invoke-PSPackageProjectBuild -BuildScript $sb -SkipPublish +} + +if ($Publish.IsPresent) +{ + Invoke-PSPackageProjectPublish -Signed:$Signed.IsPresent } if ( $Test.IsPresent ) { diff --git a/Modules/Microsoft.PowerShell.SecretManagement/.ci/ci.yml b/Modules/Microsoft.PowerShell.SecretManagement/.ci/ci.yml index 10518d9..9e9b3db 100644 --- a/Modules/Microsoft.PowerShell.SecretManagement/.ci/ci.yml +++ b/Modules/Microsoft.PowerShell.SecretManagement/.ci/ci.yml @@ -71,10 +71,11 @@ stages: Install-Module -Name PSPackageProject -Force $config = Get-PSPackageProjectConfiguration $signSrcPath = "$($config.BuildOutputPath)\$($config.ModuleName)" - $signOutPath = "$($config.BuildOutputPath)\$($config.ModuleName)\Signed" + $signOutPath = "$($config.SignedOutputPath)\$($config.ModuleName)" if (! (Test-Path -Path $signOutPath)) { $null = New-Item -Path $signOutPath -ItemType Directory } + Write-Host "Signed output path is: $signOutPath" $signXmlPath = "$($config.SourcePath)\..\sign-module-files.xml" # Set signing src path variable $vstsCommandString = "vso[task.setvariable variable=signSrcPath]${signSrcPath}" @@ -107,6 +108,10 @@ stages: binVersionOverride: '' condition: and(and(succeeded(), eq(variables['Build.Reason'], 'Manual')), ne(variables['SkipSigning'], 'True')) + - pwsh: | + $(Build.SourcesDirectory)/build.ps1 -Publish -Signed + displayName: Create signed artifact + - stage: Compliance displayName: Compliance dependsOn: Build diff --git a/Modules/Microsoft.PowerShell.SecretManagement/.ci/release.yml b/Modules/Microsoft.PowerShell.SecretManagement/.ci/release.yml index 650d624..e389472 100644 --- a/Modules/Microsoft.PowerShell.SecretManagement/.ci/release.yml +++ b/Modules/Microsoft.PowerShell.SecretManagement/.ci/release.yml @@ -1,23 +1,34 @@ parameters: jobName: release imageName: windows-2019 - displayName: Release + displayName: 'Release Microsoft.PowerShell.SecretManagement to NuGet' jobs: - job: ${{ parameters.jobName }} pool: vmImage: ${{ parameters.imageName }} displayName: ${{ parameters.displayName }} + steps: - task: DownloadBuildArtifacts@0 displayName: 'Download artifacts' inputs: buildType: current - downloadType: single - artifactName: NuPkg + downloadType: specific + artifactName: '**/*.nupkg' downloadPath: '$(System.ArtifactsDirectory)' + - task: NuGetToolInstaller@1 displayName: 'Install NuGet' - - pwsh: | - nuget push $(System.ArtifactsDirectory)\nupkg\*.nupkg -ApiKey $(NuGetApiKey) -Source https://www.powershellgallery.com/api/v2/package/ -NonInteractive - displayName: Publish Package + + - powershell: | + Get-ChildItem '$(System.ArtifactsDirectory)/Microsoft.PowerShell.SecretManagement.*.nupkg' + displayName: 'Capture NuGet package' + + - task: NuGetCommand@2 + displayName: 'Push Microsoft.PowerShell.SecretManagement artifacts to AzArtifactsFeed' + inputs: + command: push + packagesToPush: '$(System.ArtifactsDirectory)/Microsoft.PowerShell.SecretManagement.*.nupkg' + nuGetFeedType: external + publishFeedCredentials: AzArtifactFeed diff --git a/Modules/Microsoft.PowerShell.SecretManagement/build.ps1 b/Modules/Microsoft.PowerShell.SecretManagement/build.ps1 index d00e1cd..a3a0fc5 100644 --- a/Modules/Microsoft.PowerShell.SecretManagement/build.ps1 +++ b/Modules/Microsoft.PowerShell.SecretManagement/build.ps1 @@ -1,6 +1,8 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. +# Do NOT edit this file. Edit dobuild.ps1 +[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingWriteHost", "")] param ( [Parameter(ParameterSetName="build")] [switch] @@ -10,6 +12,14 @@ param ( [switch] $Build, + [Parameter(ParameterSetName="publish")] + [switch] + $Publish, + + [Parameter(ParameterSetName="publish")] + [switch] + $Signed, + [Parameter(ParameterSetName="build")] [switch] $Test, @@ -39,6 +49,7 @@ $config = Get-PSPackageProjectConfiguration -ConfigPath $PSScriptRoot $script:ModuleName = $config.ModuleName $script:SrcPath = $config.SourcePath $script:OutDirectory = $config.BuildOutputPath +$script:SignedDirectory = $config.SignedOutputPath $script:TestPath = $config.TestPath $script:ModuleRoot = $PSScriptRoot @@ -48,39 +59,17 @@ $script:HelpPath = $config.HelpPath $script:BuildConfiguration = $BuildConfiguration $script:BuildFramework = $BuildFramework -. "$PSScriptRoot\doBuild.ps1" - -# The latest DotNet (3.1.1) is needed to perform binary build. -$dotNetCmd = Get-Command -Name dotNet -ErrorAction SilentlyContinue -$dotnetVersion = $null -if ($dotNetCmd -ne $null) { - $info = dotnet --info - foreach ($item in $info) { - $index = $item.IndexOf('Version:') - if ($index -gt -1) { - $versionStr = $item.SubString('Version:'.Length + $index) - $null = [version]::TryParse($versionStr, [ref] $dotnetVersion) - break - } - } -} -# DotNet 3.1.1 is installed in ci.yml. Just check installation and version here. -Write-Verbose -Verbose -Message "Installed DotNet found: $($dotNetCmd -ne $null), version: $versionStr" -<# -$dotNetVersionOk = ($dotnetVersion -ne $null) -and ((($dotnetVersion.Major -eq 3) -and ($dotnetVersion.Minor -ge 1)) -or ($dotnetVersion.Major -gt 3)) -if (! $dotNetVersionOk) { - - Write-Verbose -Verbose -Message "Installing dotNet..." - $installObtainUrl = "https://dotnet.microsoft.com/download/dotnet-core/scripts/v1" - - Remove-Item -ErrorAction SilentlyContinue -Recurse -Force ~\AppData\Local\Microsoft\dotnet - $installScript = "dotnet-install.ps1" - Invoke-WebRequest -Uri $installObtainUrl/$installScript -OutFile $installScript - - & ./$installScript -Channel 'release' -Version '3.1.101' - Write-Verbose -Verbose -Message "dotNet installation complete." +if ($env:TF_BUILD) { + $vstsCommandString = "vso[task.setvariable variable=BUILD_OUTPUT_PATH]$OutDirectory" + Write-Host ("sending " + $vstsCommandString) + Write-Host "##$vstsCommandString" + + $vstsCommandString = "vso[task.setvariable variable=SIGNED_OUTPUT_PATH]$SignedDirectory" + Write-Host ("sending " + $vstsCommandString) + Write-Host "##$vstsCommandString" } -#> + +. $PSScriptRoot\dobuild.ps1 if ($Clean -and (Test-Path $OutDirectory)) { @@ -109,7 +98,12 @@ else if ($Build.IsPresent) { $sb = (Get-Item Function:DoBuild).ScriptBlock - Invoke-PSPackageProjectBuild -BuildScript $sb + Invoke-PSPackageProjectBuild -BuildScript $sb -SkipPublish +} + +if ($Publish.IsPresent) +{ + Invoke-PSPackageProjectPublish -Signed:$Signed.IsPresent } if ( $Test.IsPresent ) { diff --git a/Modules/Microsoft.PowerShell.SecretManagement/pspackageproject.json b/Modules/Microsoft.PowerShell.SecretManagement/pspackageproject.json index fa3ee08..6e4e247 100644 --- a/Modules/Microsoft.PowerShell.SecretManagement/pspackageproject.json +++ b/Modules/Microsoft.PowerShell.SecretManagement/pspackageproject.json @@ -2,6 +2,7 @@ "ModuleName": "Microsoft.PowerShell.SecretManagement", "Culture": "en-US", "BuildOutputPath": "out", + "SignedOutputPath": "signed", "HelpPath": "help", "TestPath": "test", "SourcePath": "src" diff --git a/Modules/Microsoft.PowerShell.ThreadJob/.ci/ci.yml b/Modules/Microsoft.PowerShell.ThreadJob/.ci/ci.yml index 8423bf0..ef17bd5 100644 --- a/Modules/Microsoft.PowerShell.ThreadJob/.ci/ci.yml +++ b/Modules/Microsoft.PowerShell.ThreadJob/.ci/ci.yml @@ -71,10 +71,11 @@ stages: Install-Module -Name PSPackageProject -Force $config = Get-PSPackageProjectConfiguration $signSrcPath = "$($config.BuildOutputPath)\$($config.ModuleName)" - $signOutPath = "$($config.BuildOutputPath)\$($config.ModuleName)\Signed" + $signOutPath = "$($config.SignedOutputPath)\$($config.ModuleName)" if (! (Test-Path -Path $signOutPath)) { $null = New-Item -Path $signOutPath -ItemType Directory } + Write-Host "Signed output path is: $signOutPath" $signXmlPath = "$($config.SourcePath)\..\sign-module-files.xml" # Set signing src path variable $vstsCommandString = "vso[task.setvariable variable=signSrcPath]${signSrcPath}" @@ -107,6 +108,10 @@ stages: binVersionOverride: '' condition: and(and(succeeded(), eq(variables['Build.Reason'], 'Manual')), ne(variables['SkipSigning'], 'True')) + - pwsh: | + $(Build.SourcesDirectory)/build.ps1 -Publish -Signed + displayName: Create signed artifact + - stage: Compliance displayName: Compliance dependsOn: Build diff --git a/Modules/Microsoft.PowerShell.ThreadJob/.ci/release.yml b/Modules/Microsoft.PowerShell.ThreadJob/.ci/release.yml index 650d624..2ac1989 100644 --- a/Modules/Microsoft.PowerShell.ThreadJob/.ci/release.yml +++ b/Modules/Microsoft.PowerShell.ThreadJob/.ci/release.yml @@ -1,23 +1,34 @@ parameters: jobName: release imageName: windows-2019 - displayName: Release + displayName: 'Release Microsoft.PowerShell.ThreadJob to NuGet' jobs: - job: ${{ parameters.jobName }} pool: vmImage: ${{ parameters.imageName }} displayName: ${{ parameters.displayName }} + steps: - task: DownloadBuildArtifacts@0 displayName: 'Download artifacts' inputs: buildType: current - downloadType: single - artifactName: NuPkg + downloadType: specific + itemPattern: '**/*.nupkg' downloadPath: '$(System.ArtifactsDirectory)' + - task: NuGetToolInstaller@1 displayName: 'Install NuGet' - - pwsh: | - nuget push $(System.ArtifactsDirectory)\nupkg\*.nupkg -ApiKey $(NuGetApiKey) -Source https://www.powershellgallery.com/api/v2/package/ -NonInteractive - displayName: Publish Package + + - powershell: | + Get-ChildItem '$(System.ArtifactsDirectory)/Microsoft.PowerShell.ThreadJob.*.nupkg' + displayName: 'Capture NuGet package' + + - task: NuGetCommand@2 + displayName: 'Push PSThreadJob artifacts to AzArtifactsFeed' + inputs: + command: push + packagesToPush: '$(System.ArtifactsDirectory)/Microsoft.PowerShell.ThreadJob.*.nupkg' + nuGetFeedType: external + publishFeedCredentials: AzArtifactFeed diff --git a/Modules/Microsoft.PowerShell.ThreadJob/build.ps1 b/Modules/Microsoft.PowerShell.ThreadJob/build.ps1 index 7d44f4d..5353230 100644 --- a/Modules/Microsoft.PowerShell.ThreadJob/build.ps1 +++ b/Modules/Microsoft.PowerShell.ThreadJob/build.ps1 @@ -1,6 +1,8 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. +# Do NOT edit this file. Edit dobuild.ps1 +[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingWriteHost", "")] param ( [Parameter(ParameterSetName="build")] [switch] @@ -10,6 +12,14 @@ param ( [switch] $Build, + [Parameter(ParameterSetName="publish")] + [switch] + $Publish, + + [Parameter(ParameterSetName="publish")] + [switch] + $Signed, + [Parameter(ParameterSetName="build")] [switch] $Test, @@ -39,6 +49,7 @@ $config = Get-PSPackageProjectConfiguration -ConfigPath $PSScriptRoot $script:ModuleName = $config.ModuleName $script:SrcPath = $config.SourcePath $script:OutDirectory = $config.BuildOutputPath +$script:SignedDirectory = $config.SignedOutputPath $script:TestPath = $config.TestPath $script:ModuleRoot = $PSScriptRoot @@ -48,39 +59,17 @@ $script:HelpPath = $config.HelpPath $script:BuildConfiguration = $BuildConfiguration $script:BuildFramework = $BuildFramework -. "$PSScriptRoot\doBuild.ps1" - -# The latest DotNet (3.1.1) is needed to perform binary build. -$dotNetCmd = Get-Command -Name dotNet -ErrorAction SilentlyContinue -$dotnetVersion = $null -if ($dotNetCmd -ne $null) { - $info = dotnet --info - foreach ($item in $info) { - $index = $item.IndexOf('Version:') - if ($index -gt -1) { - $versionStr = $item.SubString('Version:'.Length + $index) - $null = [version]::TryParse($versionStr, [ref] $dotnetVersion) - break - } - } -} -# DotNet 3.1.1 is installed in ci.yml. Just check installation and version here. -Write-Verbose -Verbose -Message "Installed DotNet found: $($dotNetCmd -ne $null), version: $versionStr" -<# -$dotNetVersionOk = ($dotnetVersion -ne $null) -and ((($dotnetVersion.Major -eq 3) -and ($dotnetVersion.Minor -ge 1)) -or ($dotnetVersion.Major -gt 3)) -if (! $dotNetVersionOk) { - - Write-Verbose -Verbose -Message "Installing dotNet..." - $installObtainUrl = "https://dotnet.microsoft.com/download/dotnet-core/scripts/v1" - - Remove-Item -ErrorAction SilentlyContinue -Recurse -Force ~\AppData\Local\Microsoft\dotnet - $installScript = "dotnet-install.ps1" - Invoke-WebRequest -Uri $installObtainUrl/$installScript -OutFile $installScript - - & ./$installScript -Channel 'release' -Version '3.1.101' - Write-Verbose -Verbose -Message "dotNet installation complete." +if ($env:TF_BUILD) { + $vstsCommandString = "vso[task.setvariable variable=BUILD_OUTPUT_PATH]$OutDirectory" + Write-Host ("sending " + $vstsCommandString) + Write-Host "##$vstsCommandString" + + $vstsCommandString = "vso[task.setvariable variable=SIGNED_OUTPUT_PATH]$SignedDirectory" + Write-Host ("sending " + $vstsCommandString) + Write-Host "##$vstsCommandString" } -#> + +. $PSScriptRoot\dobuild.ps1 if ($Clean -and (Test-Path $OutDirectory)) { @@ -109,7 +98,12 @@ else if ($Build.IsPresent) { $sb = (Get-Item Function:DoBuild).ScriptBlock - Invoke-PSPackageProjectBuild -BuildScript $sb + Invoke-PSPackageProjectBuild -BuildScript $sb -SkipPublish +} + +if ($Publish.IsPresent) +{ + Invoke-PSPackageProjectPublish -Signed:$Signed.IsPresent } if ( $Test.IsPresent ) { diff --git a/Modules/Microsoft.PowerShell.ThreadJob/pspackageproject.json b/Modules/Microsoft.PowerShell.ThreadJob/pspackageproject.json index 1a81614..0ae6b35 100644 --- a/Modules/Microsoft.PowerShell.ThreadJob/pspackageproject.json +++ b/Modules/Microsoft.PowerShell.ThreadJob/pspackageproject.json @@ -2,6 +2,7 @@ "ModuleName": "Microsoft.PowerShell.ThreadJob", "Culture": "en-US", "BuildOutputPath": "out", + "SignedOutputPath": "signed", "HelpPath": "help", "TestPath": "test", "SourcePath": "src" From 8012b9a7a48c7008f66d73f133834bd1bfcc01e9 Mon Sep 17 00:00:00 2001 From: Paul Higinbotham Date: Mon, 4 May 2020 15:07:58 -0700 Subject: [PATCH 2/2] Fix artifact path --- Modules/Microsoft.PowerShell.RemotingTools/.ci/release.yml | 4 ++-- Modules/Microsoft.PowerShell.SecretManagement/.ci/release.yml | 4 ++-- Modules/Microsoft.PowerShell.ThreadJob/.ci/release.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Modules/Microsoft.PowerShell.RemotingTools/.ci/release.yml b/Modules/Microsoft.PowerShell.RemotingTools/.ci/release.yml index 3dfc390..4c68cbe 100644 --- a/Modules/Microsoft.PowerShell.RemotingTools/.ci/release.yml +++ b/Modules/Microsoft.PowerShell.RemotingTools/.ci/release.yml @@ -22,13 +22,13 @@ jobs: displayName: 'Install NuGet' - powershell: | - Get-ChildItem '$(Build.ArtifactStagingDirectory)/Microsoft.PowerShell.RemotingTools.*.nupkg' + Get-ChildItem '$(Build.ArtifactStagingDirectory)/nupkg/Microsoft.PowerShell.RemotingTools.*.nupkg' displayName: 'Capture NuGet package' - task: NuGetCommand@2 displayName: 'Push PSThreadJob artifacts to AzArtifactsFeed' inputs: command: push - packagesToPush: '$(System.ArtifactsDirectory)/Microsoft.PowerShell.RemotingTools.*.nupkg' + packagesToPush: '$(System.ArtifactsDirectory)/nupkg/Microsoft.PowerShell.RemotingTools.*.nupkg' nuGetFeedType: external publishFeedCredentials: AzArtifactFeed diff --git a/Modules/Microsoft.PowerShell.SecretManagement/.ci/release.yml b/Modules/Microsoft.PowerShell.SecretManagement/.ci/release.yml index e389472..ce8f15c 100644 --- a/Modules/Microsoft.PowerShell.SecretManagement/.ci/release.yml +++ b/Modules/Microsoft.PowerShell.SecretManagement/.ci/release.yml @@ -22,13 +22,13 @@ jobs: displayName: 'Install NuGet' - powershell: | - Get-ChildItem '$(System.ArtifactsDirectory)/Microsoft.PowerShell.SecretManagement.*.nupkg' + Get-ChildItem '$(System.ArtifactsDirectory)/nupkg/Microsoft.PowerShell.SecretManagement.*.nupkg' displayName: 'Capture NuGet package' - task: NuGetCommand@2 displayName: 'Push Microsoft.PowerShell.SecretManagement artifacts to AzArtifactsFeed' inputs: command: push - packagesToPush: '$(System.ArtifactsDirectory)/Microsoft.PowerShell.SecretManagement.*.nupkg' + packagesToPush: '$(System.ArtifactsDirectory)/nupkg/Microsoft.PowerShell.SecretManagement.*.nupkg' nuGetFeedType: external publishFeedCredentials: AzArtifactFeed diff --git a/Modules/Microsoft.PowerShell.ThreadJob/.ci/release.yml b/Modules/Microsoft.PowerShell.ThreadJob/.ci/release.yml index 2ac1989..40bff93 100644 --- a/Modules/Microsoft.PowerShell.ThreadJob/.ci/release.yml +++ b/Modules/Microsoft.PowerShell.ThreadJob/.ci/release.yml @@ -22,13 +22,13 @@ jobs: displayName: 'Install NuGet' - powershell: | - Get-ChildItem '$(System.ArtifactsDirectory)/Microsoft.PowerShell.ThreadJob.*.nupkg' + Get-ChildItem '$(System.ArtifactsDirectory)/nupkg/Microsoft.PowerShell.ThreadJob.*.nupkg' displayName: 'Capture NuGet package' - task: NuGetCommand@2 displayName: 'Push PSThreadJob artifacts to AzArtifactsFeed' inputs: command: push - packagesToPush: '$(System.ArtifactsDirectory)/Microsoft.PowerShell.ThreadJob.*.nupkg' + packagesToPush: '$(System.ArtifactsDirectory)/nupkg/Microsoft.PowerShell.ThreadJob.*.nupkg' nuGetFeedType: external publishFeedCredentials: AzArtifactFeed