Skip to content

Commit dbe86b1

Browse files
Merge remote-tracking branch 'refs/remotes/upstream/master' into MoveToOras
2 parents aeba1b7 + 6ecc668 commit dbe86b1

66 files changed

Lines changed: 3996 additions & 669 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.ci/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ resources:
1919

2020
variables:
2121
- group: GithubTestingFeedCreds
22+
- group: InstallDSC
2223

2324
stages:
2425
- stage: Build

.ci/test.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ jobs:
1111
pool:
1212
vmImage: ${{ parameters.imageName }}
1313
displayName: ${{ parameters.displayName }}
14+
variables:
15+
- group: InstallDSC
1416
steps:
1517
- ${{ parameters.powershellExecutable }}: |
1618
Install-Module -Name 'Microsoft.PowerShell.SecretManagement' -force -SkipPublisherCheck -AllowClobber
@@ -95,6 +97,83 @@ jobs:
9597
displayName: 'Setup Azure Artifacts Credential Provider secret'
9698
condition: eq(${{ parameters.useAzAuth }}, false)
9799

100+
- pwsh: |
101+
$repo = "PowerShell/DSC"
102+
$api = "https://api.github.com/repos/$repo/releases"
103+
104+
$headers = @{
105+
"User-Agent" = "pwsh"
106+
"Accept" = "application/vnd.github+json"
107+
"Authorization" = "Bearer $env:GITHUB_TOKEN"
108+
}
109+
110+
# Get releases
111+
$releases = Invoke-RestMethod -Uri $api -Headers $headers -RetryIntervalSec 30 -MaximumRetryCount 10
112+
113+
# Pick latest by publish date (handles prerelease vs stable automatically)
114+
$latest = $releases |
115+
Sort-Object published_at -Descending |
116+
Select-Object -First 1
117+
118+
Write-Host "Latest version: $($latest.tag_name) (prerelease=$($latest.prerelease))"
119+
120+
if ($IsWindows) {
121+
$assetFilter = "x86_64-pc-windows-msvc"
122+
}
123+
elseif ($IsMacOs) {
124+
$assetFilter = "x86_64-apple-darwin"
125+
}
126+
else {
127+
$assetFilter = "x86_64-linux"
128+
}
129+
130+
$assets = $latest.assets |
131+
Where-Object { $_.name -match $assetFilter }
132+
133+
Write-Host "Filtered assets: $($assets.Count)"
134+
135+
$selectedAsset = $assets | Select-Object -First 1
136+
137+
Write-Host "Selected asset: $($selectedAsset.name)"
138+
139+
$outFile = Join-Path $PWD $selectedAsset.name
140+
141+
Write-Host "Downloading $($selectedAsset.name)"
142+
143+
Invoke-WebRequest `
144+
-Uri $selectedAsset.browser_download_url `
145+
-Headers @{ "User-Agent"="pwsh" } `
146+
-OutFile $outFile
147+
148+
149+
if ($IsWindows) {
150+
Expand-Archive -Path $outFile -DestinationPath $env:AGENT_TEMPDIRECTORY -Force -Verbose
151+
}
152+
else {
153+
tar -xzf $outFile -C $env:AGENT_TEMPDIRECTORY
154+
}
155+
156+
$executableName = 'dsc'
157+
$executableExt = if ($IsWindows) { '.exe' } else { '' }
158+
159+
$executableFileName = $executableName + $executableExt
160+
161+
$executable = Get-ChildItem -Path $env:AGENT_TEMPDIRECTORY -File -Recurse -Verbose | Where-Object { $_.Name -eq $executableFileName } | Select-Object -First 1
162+
163+
if (-not $executable) {
164+
throw "Could not find dsc executable in the downloaded package"
165+
}
166+
167+
$dscRoot = Split-Path -Path $executable.FullName -Parent
168+
169+
$vstsCommandString = "vso[task.setvariable variable=DSC_ROOT]$dscRoot"
170+
Write-Host "sending " + $vstsCommandString
171+
Write-Host "##$vstsCommandString"
172+
173+
displayName: 'Install latest DSC v3'
174+
env:
175+
GITHUB_TOKEN: $(GITHUB_TOKEN)
176+
98177
- pwsh: |
99178
Get-ChildItem -Path env: | Out-String -width 9999 -Stream | Write-Verbose -Verbose
100179
displayName: Capture environment

CHANGELOG/preview.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Preview Changelog
22

3+
## [1.3.0-preview1](https://github.com/PowerShell/PSResourceGet/compare/v1.2.0..v1.3.0-preview1) - 2026-05-19
4+
5+
### New Features
6+
- Add `MAR` as default registered repository (#1955)
7+
- Add concurrent (parallel) execution for `Install-PSResource` workflows (#1950)
8+
- Add DSC V3 resource for PSResourceGet (#1852)
9+
10+
## Bug fix
11+
- Bump `Azure.Identity` from `1.17.1` to `1.17.2`(#1994)
12+
- Bump `Azure.Identity` from `1.14.2` to `1.17.1` and remove deprecated DefaultAzureCredentialOptions from constructor (#1987)
13+
- Make flaky CI tests more lenient (#1976)
14+
- Fixing the logic to determine if the current PowerShell session is Windows PowerShell or PowerShell Core (#1974 Thanks @Borgquite!)
15+
- Include local-copy prerelease string when deciding update applicability in `Update-PSResource` (#1954 Thanks @sean-r-williams!)
16+
317
## [1.2.0-rc3](https://github.com/PowerShell/PSResourceGet/compare/v1.2.0-rc2..v1.2.0-rc3) - 2026-02-06
418

519
## Bug fix

doBuild.ps1

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ function DoBuild
4747
Write-Verbose -Verbose -Message "Copying PSResourceRepository.admx to '$BuildOutPath'"
4848
Copy-Item -Path "${SrcPath}/PSResourceRepository.admx" -Dest "$BuildOutPath" -Force
4949

50+
Write-Verbose -Verbose -Message "Copying psresourceget.ps1 to '$BuildOutPath'"
51+
Copy-Item -Path "${SrcPath}/dsc/psresourceget.ps1" -Dest "$BuildOutPath" -Force
52+
53+
Write-Verbose -Verbose -Message "Copying resource manifests to '$BuildOutPath'"
54+
Copy-Item -Path "${SrcPath}/dsc/*.resource.json" -Dest "$BuildOutPath" -Force
55+
5056
# Build and place binaries
5157
if ( Test-Path "${SrcPath}/code" ) {
5258
Write-Verbose -Verbose -Message "Building assembly and copying to '$BuildOutPath'"
@@ -112,6 +118,10 @@ function DoBuild
112118
'NuGet.Protocol'
113119
'NuGet.Versioning'
114120
'OrasProject.Oras'
121+
'System.Buffers'
122+
'System.ClientModel'
123+
'System.Diagnostics.DiagnosticSource'
124+
'System.IO.FileSystem.AccessControl'
115125
'System.Memory.Data'
116126
'System.Security.Cryptography.ProtectedData'
117127
)

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"sdk": {
3-
"version": "8.0.419"
3+
"version": "8.0.421"
44
}
55
}

src/Microsoft.PowerShell.PSResourceGet.psd1

Lines changed: 11 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
@{
55
RootModule = './Microsoft.PowerShell.PSResourceGet.dll'
66
NestedModules = @('./Microsoft.PowerShell.PSResourceGet.psm1')
7-
ModuleVersion = '1.2.0'
7+
ModuleVersion = '1.3.0'
88
CompatiblePSEditions = @('Core', 'Desktop')
99
GUID = 'e4e0bda1-0703-44a5-b70d-8fe704cd0643'
1010
Author = 'Microsoft Corporation'
@@ -50,7 +50,7 @@
5050
'usres')
5151
PrivateData = @{
5252
PSData = @{
53-
# Prerelease = ''
53+
Prerelease = 'preview1'
5454
Tags = @('PackageManagement',
5555
'PSEdition_Desktop',
5656
'PSEdition_Core',
@@ -60,84 +60,19 @@
6060
ProjectUri = 'https://go.microsoft.com/fwlink/?LinkId=828955'
6161
LicenseUri = 'https://go.microsoft.com/fwlink/?LinkId=829061'
6262
ReleaseNotes = @'
63-
## 1.2.0
64-
65-
## 1.2.0-rc3
66-
67-
## Bug fix
68-
- Packages that depend on a specific version should search for the dependency with NormalizedVersion (#1941)
69-
70-
## 1.2.0-rc2
71-
72-
## Bug fix
73-
- For packages with dependency on a specific version use specific version instead of version range (#1937)
74-
75-
## 1.2.0-rc1
76-
77-
## Bug fix
78-
- `WhatIf` parameter should respect provided value instead of simply checking presence (#1925)
79-
80-
## 1.2.0-preview5
63+
## 1.3.0-preview1
8164
8265
### New Features
83-
- Add `Reset-PSResourceRepository` cmdlet to recover from corrupted repository store (#1895)
84-
- Improve performance of `ContainerRegistry` repositories by caching token (#1920)
85-
86-
## Bug fix
87-
- Ensure `Update-PSResource` does not re-install dependency packages which already satisfy dependency criteria (#1919)
88-
- Retrieve non-anonymous access token when publishing to ACR (#1918)
89-
- Filter out path separators when passing in package names as a parameter for any cmdlet (#1916)
90-
- Respect `TrustRepository` parameter when using `-RequiredResource` with `Install-PSResource` (#1910)
91-
- Fix bug with 'PSModuleInfo' property deserialization when validating module manifest (#1909)
92-
- Prevent users from setting ApiVersion to 'Unknown' in `Set-PSResourceRepository` and `Register-PSResourceRepository` (#1892)
93-
94-
## 1.2.0-preview4
66+
- Add `MAR` as default registered repository (#1955)
67+
- Add concurrent (parallel) execution for `Install-PSResource` workflows (#1950)
68+
- Add DSC V3 resource for PSResourceGet (#1852)
9569
9670
## Bug fix
97-
98-
- Fix typos in numerous files (#1875 Thanks @SamErde!)
99-
- MAR fails to parse RequiredVersion for dependencies (#1876 Thanks @o-l-a-v!)
100-
- Get-InstalledPSResource -Path don't throw if no subdirectories were found (#1877 Thanks @o-l-a-v!)
101-
- Handle boolean correctly in RequiredResourceFile for prerelease key (#1843 Thanks @o-l-a-v!)
102-
- Fix CodeQL configuration (#1886)
103-
- Add cmdlet aliases: gres, usres, and svres (#1888)
104-
- Add warning when AuthenticodeCheck is used on non-Windows platforms (#1891)
105-
- Fix Compress-PSResource ignoring .gitkeep and other dotfiles (#1889)
106-
- Add CodeQL suppression for ContainerRegistryServerAPICalls (#1897)
107-
- Fix broken Install-PSResource test with warning condition incorrect (#1899)
108-
- Uninstall-PSResource should not fail silently when resource was not found or prerelease criteria not met (#1898)
109-
- Uninstall-PSResource should delete subdirectories without Access Denied error on OneDrive (#1860)
110-
111-
## 1.2.0-preview3
112-
113-
### New Features
114-
- Pagination for MCR catalog items (#1870)
115-
116-
### Bug Fix
117-
- Bug fix for CLM issues (#1869)
118-
- Update `-ModulePrefix` to be a static parameter (#1868)
119-
- Bug fix for populating all `#Requires` fields in `Update-PSScriptFileInfo` (#1863)
120-
- Bug fix for populating `Includes` metadata for packages from container registry repositories (#1861)
121-
- Bug fix for `Find-PSResource` and `Install-PSResource` not retrieving unlisted package versions (#1859)
122-
123-
## 1.2.0-preview2
124-
125-
### New Features
126-
- Integration of the Azure Artifacts Credential Provider for ADO feeds (#1765)
127-
128-
### Bug Fix
129-
- Bug fixes for NuGet v3 dependencies (#1841 Thanks @o-l-a-v!)
130-
- Bug fix for temporary installation path failure when installing PSResources on Linux machines (#1842 Thanks @o-l-a-v!)
131-
132-
## 1.2.0-preview1
133-
134-
### New Features
135-
- Dependency support for PSResources in v3 repositories (#1778 Thanks @o-l-a-v!)
136-
137-
### Bug Fix
138-
- Updated dependencies and added connection timeout to improve CI tests reliability (#1829)
139-
- Improvements in `ContainerRegistry` repositories in listing repository catalog (#1831)
140-
- Wildcard attribute added to `-Repository` parameter of `Install-PSResource` (#1808)
71+
- Bump `Azure.Identity` from `1.17.1` to `1.17.2`(#1994)
72+
- Bump `Azure.Identity` from `1.14.2` to `1.17.1` and remove deprecated DefaultAzureCredentialOptions from constructor (#1987)
73+
- Make flaky CI tests more lenient (#1976)
74+
- Fixing the logic to determine if the current PowerShell session is Windows PowerShell or PowerShell Core (#1974 Thanks @Borgquite!)
75+
- Include local-copy prerelease string when deciding update applicability in `Update-PSResource` (#1954 Thanks @sean-r-williams!)
14176
14277
See change log (CHANGELOG) at https://github.com/PowerShell/PSResourceGet
14378
'@

src/code/ContainerRegistryServerAPICalls.cs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
using System;
55
using System.Collections;
6+
using System.Collections.Concurrent;
67
using System.Collections.Generic;
78
using System.IO;
89
using System.Linq;
@@ -71,6 +72,16 @@ public ContainerRegistryServerAPICalls(PSRepositoryInfo repository, PSCmdlet cmd
7172

7273
#region Overridden Methods
7374

75+
public override Task<FindResults> FindVersionAsync(string packageName, string version, ResourceType type, ConcurrentQueue<ErrorRecord> errorMsgs, ConcurrentQueue<string> warningMsgs, ConcurrentQueue<string> debugMsgs, ConcurrentQueue<string> verboseMsgs)
76+
{
77+
throw new NotImplementedException("FindVersionAsync is not implemented for ContainerRegistryServerAPICalls.");
78+
}
79+
80+
public override Task<FindResults> FindVersionGlobbingAsync(string packageName, VersionRange versionRange, bool includePrerelease, ResourceType type, bool getOnlyLatest, ConcurrentQueue<ErrorRecord> errorMsgs, ConcurrentQueue<string> warningMsgs, ConcurrentQueue<string> debugMsgs, ConcurrentQueue<string> verboseMsgs)
81+
{
82+
throw new NotImplementedException("FindVersionGlobbingAsync is not implemented for ContainerRegistryServerAPICalls.");
83+
}
84+
7485
/// <summary>
7586
/// Find method which allows for searching for all packages from a repository and returns latest version for each.
7687
/// </summary>
@@ -136,6 +147,12 @@ public override FindResults FindName(string packageName, bool includePrerelease,
136147
return new FindResults(stringResponse: new string[] { }, hashtableResponse: pkgResult.ToArray(), responseType: containerRegistryFindResponseType);
137148
}
138149

150+
151+
public override Task<FindResults> FindNameAsync(string packageName, bool includePrerelease, ResourceType type, ConcurrentQueue<ErrorRecord> errorMsgs, ConcurrentQueue<string> warningMsgs, ConcurrentQueue<string> debugMsgs, ConcurrentQueue<string> verboseMsgs)
152+
{
153+
throw new NotImplementedException("FindNameAsync is not implemented for ContainerRegistryServerAPICalls.");
154+
}
155+
139156
/// <summary>
140157
/// Find method which allows for searching for single name and tag and returns latest version.
141158
/// Name: no wildcard support
@@ -292,6 +309,19 @@ public override Stream InstallPackage(string packageName, string packageVersion,
292309
return results;
293310
}
294311

312+
/// <summary>
313+
/// Installs a specific package asynchronously.
314+
/// User may request to install package with or without providing version (as seen in examples below), but prior to calling this method the package is located and package version determined.
315+
/// Therefore, package version should not be null in this method.
316+
/// Name: no wildcard support.
317+
/// Examples: Install "PowerShellGet" -Version "3.5.0-alpha"
318+
/// Install "PowerShellGet" -Version "3.0.0"
319+
/// </summary>
320+
public override Task<Stream> InstallPackageAsync(string packageName, string packageVersion, bool includePrerelease, ConcurrentQueue<ErrorRecord> errorMsgs, ConcurrentQueue<string> warningMsgs, ConcurrentQueue<string> debugMsgs, ConcurrentQueue<string> verboseMsgs)
321+
{
322+
throw new NotImplementedException("FindNameAsync is not implemented for ContainerRegistryServerAPICalls.");
323+
}
324+
295325
/// <summary>
296326
/// Installs a package with version specified.
297327
/// Version can be prerelease or stable.

0 commit comments

Comments
 (0)