Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .pipelines/DSC-Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ pr:
- onebranch
- release*

schedules:
- cron: '0 3 * * 1'
displayName: Weekly Build
branches:
include:
- main
always: true

variables:
BuildConfiguration: 'release'
PackageRoot: '$(System.ArtifactsDirectory)/Packages'
Expand All @@ -28,6 +36,7 @@ extends:
WindowsHostVersion:
Disk: Large
Version: 2022
# Network: NetLock
customTags: 'ES365AIMigrationTooling'
globalSdl:
disableLegacyManifest: true
Expand Down
19 changes: 15 additions & 4 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -352,18 +352,29 @@ if (!$Clippy -and !$SkipBuild) {
if ($Test) {
$failed = $false

$usingADO = ($null -ne $env:TF_BUILD)
$repository = 'PSGallery'

if ($usingADO) {
$repository = 'CFS'
if ($null -eq (Get-PSResourceRepository -Name CFS -ErrorAction Ignore)) {
"Registering CFS repository"
Register-PSResourceRepository -uri 'https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/nuget/v2' -Name CFS -Trusted
}
}

if ($IsWindows) {
# PSDesiredStateConfiguration module is needed for Microsoft.Windows/WindowsPowerShell adapter
$FullyQualifiedName = @{ModuleName="PSDesiredStateConfiguration";ModuleVersion="2.0.7"}
if (-not(Get-Module -ListAvailable -FullyQualifiedName $FullyQualifiedName))
{ "Installing module PSDesiredStateConfiguration 2.0.7"
Install-PSResource -Name PSDesiredStateConfiguration -Version 2.0.7 -Repository PSGallery -TrustRepository
{
Install-PSResource -Name PSDesiredStateConfiguration -Version 2.0.7 -Repository $repository -TrustRepository
}
}

if (-not(Get-Module -ListAvailable -Name Pester))
{ "Installing module Pester"
Install-PSResource Pester -WarningAction Ignore -Repository PSGallery -TrustRepository
Install-PSResource Pester -WarningAction Ignore -Repository $repository -TrustRepository
}

foreach ($project in $projects) {
Expand Down Expand Up @@ -408,7 +419,7 @@ if ($Test) {
if (-not(Get-Module -ListAvailable -Name Pester))
{ "Installing module Pester"
$InstallTargetDir = ($env:PSModulePath -split ";")[0]
Find-PSResource -Name 'Pester' -Repository 'PSGallery' | Save-PSResource -Path $InstallTargetDir -TrustRepository
Find-PSResource -Name 'Pester' -Repository $repository | Save-PSResource -Path $InstallTargetDir -TrustRepository
}

"Updated Pester module location:"
Expand Down
2 changes: 1 addition & 1 deletion dsc/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.