diff --git a/.vsts-ci/templates/windows-packaging.yml b/.vsts-ci/templates/windows-packaging.yml index 93de5804fb..3f03323cc3 100644 --- a/.vsts-ci/templates/windows-packaging.yml +++ b/.vsts-ci/templates/windows-packaging.yml @@ -26,5 +26,6 @@ jobs: - powershell: | Import-Module .\tools\ci.psm1 + Invoke-CIAfterTest Invoke-CIFinish -NuGetKey $(NUGET_KEY) displayName: Build and Test Package diff --git a/tools/ci.psm1 b/tools/ci.psm1 index 1034124b95..73ba6ba79f 100644 --- a/tools/ci.psm1 +++ b/tools/ci.psm1 @@ -440,10 +440,9 @@ function Invoke-CIAfterTest if (Test-DailyBuild) { - ## Publish code coverage build, tests and OpenCover module to artifacts, so webhook has the information. - Push-Artifact -Path $_ -Name 'CodeCoverage' - Push-Artifact $testPackageFullName -Name 'artifacts' - $codeCoverageOutput = Split-Path -Parent (Get-PSOutput -Options (New-PSOptions -Configuration CodeCoverage)) + Start-PSBuild -Configuration 'CodeCoverage' -Clean + + $codeCoverageOutput = Split-Path -Parent (Get-PSOutput) $codeCoverageArtifacts = Compress-CoverageArtifacts -CodeCoverageOutput $codeCoverageOutput Write-Host -ForegroundColor Green 'Upload CodeCoverage artifacts'