Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
admins
ACCESSTOKEN
apps
appwiz
appx
Expand Down Expand Up @@ -56,11 +57,13 @@ mubaidr
NOLOGO
NOLOGO
nonexistentpackage
npmjs
numpy
NVM
opencode
onboarding
opensource
oss
pkief
powertoys
prerel
Expand All @@ -74,6 +77,7 @@ reduxjs
requ
restsource
ritwickdey
sourced
tastejs
todomvc
toolsai
Expand Down
23 changes: 23 additions & 0 deletions pipelines/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ extends:
- ES365AIMigrationTooling
settings:
skipBuildTagsForGitHubPullRequests: true
# CFSClean is omitted so NpmDsc can reach registry.npmjs.org. CFSClean2 (PowerShell Gallery)
# and CFSClean3 are enforced; PowerShell modules are sourced from an internal feed instead.
networkIsolationPolicy: Permissive,CFSClean2,CFSClean3

stages:
- stage: WinGet_DSC_Artifacts_Publish
Expand Down Expand Up @@ -94,6 +97,26 @@ extends:
clean: true
fetchTags: false

- task: PowerShell@2
displayName: "Install PSDesiredStateConfiguration from internal feed"
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
inputs:
pwsh: true
targetType: "inline"
# PowerShell Gallery is blocked by CFSClean2, so the module is pulled from an
# internal Azure Artifacts feed that has PowerShell Gallery as an upstream source.
script: |
$token = $env:SYSTEM_ACCESSTOKEN | ConvertTo-SecureString -AsPlainText -Force
$credential = [System.Management.Automation.PSCredential]::new('AzureDevOps', $token)
$feedUri = 'https://pkgs.dev.azure.com/shine-oss/winget-dsc/_packaging/WinGetDscDependencies/nuget/v3/index.json'
$repoName = 'WinGetDscDependencies'
if (-not (Get-PSResourceRepository -Name $repoName -ErrorAction SilentlyContinue)) {
Register-PSResourceRepository -Name $repoName -Uri $feedUri -Trusted
}
Install-PSResource -Name PSDesiredStateConfiguration -Version '2.0.7' -Repository $repoName -Credential $credential -TrustRepository
Get-Module -Name PSDesiredStateConfiguration -ListAvailable | Select-Object Name, Version

- task: PowerShell@2
displayName: "Run Pester tests for DSC modules"
inputs:
Expand Down
4 changes: 3 additions & 1 deletion tests/Microsoft.DotNet.Dsc/Microsoft.DotNet.Dsc.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ Set-StrictMode -Version Latest
#>

BeforeAll {
Install-Module -Name PSDesiredStateConfiguration -Force -SkipPublisherCheck
if ((Get-Module -Name PSDesiredStateConfiguration -ListAvailable).Version -ne '2.0.7') {
Install-Module -Name PSDesiredStateConfiguration -Force -SkipPublisherCheck -RequiredVersion '2.0.7'
}
Import-Module Microsoft.DotNet.Dsc

$script:toolsDir = Join-Path $env:USERPROFILE 'tools'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ Set-StrictMode -Version Latest
# InModuleScope ensures that all mocks are on the Microsoft.Windows.Developer module.
InModuleScope Microsoft.Windows.Developer {
BeforeAll {
Install-Module -Name PSDesiredStateConfiguration -Force -SkipPublisherCheck
if ((Get-Module -Name PSDesiredStateConfiguration -ListAvailable).Version -ne '2.0.7') {
Install-Module -Name PSDesiredStateConfiguration -Force -SkipPublisherCheck -RequiredVersion '2.0.7'
}
Import-Module Microsoft.Windows.Developer

# Create test registry path.
Expand Down
Loading