-
Couldn't load subscription status.
- Fork 99
-
We really would like to migrate from PowerShellGet v2 to PSResourceGet for these 2 use-cases:
- Using an internal Repository for own PowerShell modules (NuGet v2 based)
- Using a PowerShellGallery Mirror for a centralized internal endpoint for external modules.
Up to now I could deploy these repos by grouping them like this:
Register-PSRepository -Name 'Nexus' ` -SourceLocation 'https://nexus.ocram85.com/repository/PSGroup/' ` -PublishLocation 'https://nexus.ocram85.com/repository/PSModulesRepo/' ` -InstallationPolicy 'Trusted' -Verbose
But querying the PowerShellGallery mirror with FindPS-Resource doesn't work fully. When searching for module like 'Pester' it returns the wrong elements:
Register-PSResourceRepository -Name 'Nexus' -Uri 'https://nexus.ocram85.com/repository/PSGallery' -Trusted -Priority 10 -ApiVersion v2 Find-PSResource -Name Pester -Verbose -Repository 'Nexus' -Debug --- DEBUG: In FindPSResource::ProcessResourceNameParameterSet() DEBUG: Filtering package name(s) on wildcards DEBUG: In FindHelper::FindByResourceName() DEBUG: Parameters passed in >>> Name: 'Pester'; ResourceType: 'None'; VersionRange: ''; NuGetVersion: ''; VersionType: 'NoVersion'; Version: ''; Prerelease: 'False'; Tag: ''; Repository: 'Nexus'; IncludeDependencies 'False' DEBUG: Searching through repository 'Nexus' DEBUG: In FindHelper::SearchByNames() DEBUG: No version specified, package name is specified DEBUG: In V2ServerAPICalls::FindName() DEBUG: In V2ServerAPICalls::HttpRequestCall() DEBUG: Request url is 'https://nexus.ocram85.com/repository/PSGallery/FindPackagesById()?id='Pester'&$inlinecount=allpages&$filter=IsLatestVersion and Id eq 'Pester'' DEBUG: Found package 'Pester' version '3.0.3' DEBUG: Package 'Pester' returned from server DEBUG: Package 'Pester' was previously discovered and returned Name Version Prerelease Repository Description ---- ------- ---------- ---------- ----------- Pester 3.0.3 Nexus Pester provides a framework for running BDD style Tests to execute and validate PowerShell commands inside of PowerShell and offers a powerful set of Mocking Functions that allow tests to mimic and mock the functio...
Did anyone tested using Publish-PSResource to upload PowerShell module to such a repository? - Does nuget v2 still work?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment