You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To be able to run this locally the environment variables need to be set to mimic the behavior of AppVeyor.
I ended up creating a script Start-Build.ps1 in the root folder that sets the variables before running Invoke-Build.
This is not an optimal idea since this script generate a varning in the unit test that Invoke-Build is an alias, and should be change to point to the full script path 'C:\Program Files\WindowsPowerShell\Modules\InvokeBuild\3.6.4\Invoke-Build.ps1'. Since the version can change, it's not possible to change to the full path.
$env:TenantID = '<guid>'
$env:SubscriptionID = '<guid>'
$env:ApplicationID = '<guid>'
$env:ApplicationPassword = '<key/password>'
$env:Location = 'westeurope' # Used by @PlagueHO's branch (PR #21).
$env:BuildFolder = $PSScriptRoot
$env:ProjectName = Split-Path -Path $PSScriptRoot -Leaf
$env:ProjectID = New-Guid # This is used to create a folder in $env:TEMP.
$env:BuildID = 1001 # Any number
Invoke-Build -File .\DscConfiguration.Tests\.build.ps1 -Summary
To be able to run this locally the environment variables need to be set to mimic the behavior of AppVeyor.
I ended up creating a script
Start-Build.ps1in the root folder that sets the variables before runningInvoke-Build.This is not an optimal idea since this script generate a varning in the unit test that Invoke-Build is an alias, and should be change to point to the full script path
'C:\Program Files\WindowsPowerShell\Modules\InvokeBuild\3.6.4\Invoke-Build.ps1'. Since the version can change, it's not possible to change to the full path.