diff --git a/.vsts-ci/templates/windows-packaging.yml b/.vsts-ci/templates/windows-packaging.yml index 455efbb9fec..2c691809885 100644 --- a/.vsts-ci/templates/windows-packaging.yml +++ b/.vsts-ci/templates/windows-packaging.yml @@ -30,5 +30,5 @@ jobs: - pwsh: | Import-Module .\tools\ci.psm1 New-CodeCoverageAndTestPackage - Invoke-CIFinish -NuGetKey $(NUGET_KEY) + Invoke-CIFinish displayName: Build and Test Package diff --git a/tools/ci.psm1 b/tools/ci.psm1 index 2329b56db99..2042349445f 100644 --- a/tools/ci.psm1 +++ b/tools/ci.psm1 @@ -437,13 +437,9 @@ function Get-ReleaseTag # Implements CI 'on_finish' step function Invoke-CIFinish { - param( - [string] $NuGetKey - ) - if($PSEdition -eq 'Core' -and ($IsLinux -or $IsMacOS)) { - return New-LinuxPackage -NugetKey $NugetKey + return New-LinuxPackage } try { @@ -537,12 +533,6 @@ function Invoke-CIFinish $pushedAllArtifacts = $false Write-Warning "Artifact $_ does not exist." } - - if($NuGetKey -and $env:NUGET_URL -and [system.io.path]::GetExtension($_) -ieq '.nupkg') - { - Write-Log "pushing $_ to $env:NUGET_URL" - Start-NativeExecution -sb {dotnet nuget push $_ --api-key $NuGetKey --source "$env:NUGET_URL/api/v2/package"} -IgnoreExitcode - } } if(!$pushedAllArtifacts) { @@ -692,10 +682,6 @@ function Invoke-LinuxTestsCore function New-LinuxPackage { - param( - [string] - $NugetKey - ) $isFullBuild = Test-DailyBuild $releaseTag = Get-ReleaseTag @@ -716,16 +702,6 @@ function New-LinuxPackage Write-Error -Message "Package NOT found: $package" } - # Publish the packages to the nuget feed if: - # 1 - It's a Daily build (already checked, for not a PR) - # 2 - We have the info to publish (NUGET_KEY and NUGET_URL) - # 3 - it's a nupkg file - if($isFullBuild -and $NugetKey -and $env:NUGET_URL -and [system.io.path]::GetExtension($package) -ieq '.nupkg') - { - Write-Log "pushing $package to $env:NUGET_URL" - Start-NativeExecution -sb {dotnet nuget push $package --api-key $NugetKey --source "$env:NUGET_URL/api/v2/package"} -IgnoreExitcode - } - if($isFullBuild) { if ($package -isnot [System.IO.FileInfo])