From 1dc9a02d7dd4be95f7b01578dcd97887340c63de Mon Sep 17 00:00:00 2001 From: jhoneill Date: Fri, 30 Nov 2018 16:05:58 +0000 Subject: [PATCH] Updates to azure pipeline --- DoTests.ps1 | 7 +++++-- azure-pipelines.yml | 3 --- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/DoTests.ps1 b/DoTests.ps1 index ce81979..ae52d13 100644 --- a/DoTests.ps1 +++ b/DoTests.ps1 @@ -7,18 +7,21 @@ param( ## $PSVersionTable.PSVersion +$env:BUILD_ARTIFACTSTAGINGDIRECTORY +$VerbosePreference = "Continue" ## Create the zip before the tests run ## Otherwise the EPPlus.dll is in use after the Pester run $ModuleVersion = (Get-Content -Raw .\ImportExcel.psd1) | Invoke-Expression | ForEach-Object ModuleVersion if (!$DontCreateZip) { + if ($null -eq $env:BUILD_ARTIFACTSTAGINGDIRECTORY) {$env:BUILD_ARTIFACTSTAGINGDIRECTORY = '.'} $dest = "ImportExcel-{0}-{1}.zip" -f $ModuleVersion, (Get-Date).ToString("yyyyMMddHHmmss") - Compress-Archive -Path . -DestinationPath .\$dest + Compress-Archive -Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY -DestinationPath .\$dest -Verbose } if ($null -eq (Get-Module -ListAvailable pester)) { - Install-Module -Name Pester -Repository PSGallery -Force -Scope CurrentUser + Install-Module -Name Pester -Repository PSGallery -Force -Scope CurrentUser -Verbose } $result = Invoke-Pester -Script $PSScriptRoot\__tests__ -Verbose -PassThru diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4665bdd..0c02519 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -6,9 +6,6 @@ steps: - powershell: ./ '.\DoTests.ps1' displayName: 'PowerShell Script' -- task: ArchiveFiles@2 - displayName: 'Archive $(Build.BinariesDirectory)' - trigger: paths: exclude: