diff --git a/.vsts-ci/communityReleasePhase.yml b/.vsts-ci/communityReleasePhase.yml index 3c8852e26..cf5199ecb 100644 --- a/.vsts-ci/communityReleasePhase.yml +++ b/.vsts-ci/communityReleasePhase.yml @@ -33,7 +33,7 @@ jobs: displayName: 'docker login' condition: and( succeededOrFailed(), ne(variables['Channel'],'')) - - pwsh: 'Install-module pester -Scope CurrentUser -Force' + - pwsh: Install-module Pester -Scope CurrentUser -Force -MaximumVersion 4.99 displayName: 'Install Pester' condition: and( succeededOrFailed(), ne(variables['Channel'],'')) diff --git a/.vsts-ci/phase.yml b/.vsts-ci/phase.yml index 0dcbbc184..b4f526471 100644 --- a/.vsts-ci/phase.yml +++ b/.vsts-ci/phase.yml @@ -38,7 +38,7 @@ jobs: - pwsh: | if ( '$env:CHANNEL' -eq '' ) { exit } - Install-module pester -Scope CurrentUser -Force + Install-module Pester -Scope CurrentUser -Force -MaximumVersion 4.99 displayName: Install Pester condition: and( succeededOrFailed(), ne(variables['Channel'],'')) @@ -95,7 +95,7 @@ jobs: testResultsFiles: '**\test*.xml' testRunTitle: $(ImageName) mergeTestResults: true - + - task: PublishTestResults@2 condition: and( succeededOrFailed(), ne(variables['Channel'],'')) displayName: Publish $(ImageName) dockerlint Results diff --git a/.vsts-ci/releasePhase.yml b/.vsts-ci/releasePhase.yml index 9ceceebf5..55c57127f 100644 --- a/.vsts-ci/releasePhase.yml +++ b/.vsts-ci/releasePhase.yml @@ -99,7 +99,7 @@ jobs: displayName: 'Set SasUrl variable' condition: and( succeededOrFailed(), ne(variables['Channel'],'')) - - pwsh: 'Install-module pester -Scope CurrentUser -Force' + - pwsh: Install-module Pester -Scope CurrentUser -Force -MaximumVersion 4.99 displayName: 'Install Pester' condition: and( succeededOrFailed(), ne(variables['Channel'],'')) diff --git a/.vsts-ci/releasebuild.yml b/.vsts-ci/releasebuild.yml index 81b69e1f4..358af8467 100644 --- a/.vsts-ci/releasebuild.yml +++ b/.vsts-ci/releasebuild.yml @@ -117,7 +117,7 @@ stages: - powershell: 'Get-ChildItem env:' displayName: 'Capture Environment' - - powershell: 'Install-module pester -Scope CurrentUser -Force' + - powershell: Install-module Pester -Scope CurrentUser -Force -MaximumVersion 4.99 displayName: 'Install Pester' - powershell: | diff --git a/build.ps1 b/build.ps1 index e39c63026..4b48db118 100755 --- a/build.ps1 +++ b/build.ps1 @@ -472,7 +472,7 @@ End { if(!(Get-Module -ListAvailable pester -ErrorAction Ignore) -or $ForcePesterInstall.IsPresent) { - Install-Module -Name pester -Scope CurrentUser -Force + Install-module Pester -Scope CurrentUser -Force -MaximumVersion 4.99 } Write-Verbose -Message "logging to $logPath" -Verbose diff --git a/tools/.gitpod.Dockerfile b/tools/.gitpod.Dockerfile index de7746bbe..a2b460760 100644 --- a/tools/.gitpod.Dockerfile +++ b/tools/.gitpod.Dockerfile @@ -4,4 +4,4 @@ USER root RUN apt-get update \ && apt-get --yes install docker \ - && pwsh -NoLogo -NoProfile -c "install-module -Name Pester -Scope CurrentUser -force" + && pwsh -NoLogo -NoProfile -c "Install-module Pester -Scope CurrentUser -Force -MaximumVersion 4.99"