Skip to content

[Feature Request] Session scope for Register-PSRepository #65

Description

@f0rt

Team,
Can you please add session scope support for Register-PSRepository?

We have an internal build system that outputs PowerShell modules. Every successful build is published to an internal PSRepository (Artifactory server).
Every time we want to publish a module we have to deal with the following cases:

  • Is the repository already registered?
  • Is another repository with different name and the same SourceLocation already registered?
  • If the repository is already registered and we want to deploy on different url (PublishLocation) we have to modify the existing registration
  • Clean the build machine after build procedure (Unregister-PSRepository)
  • If 2 parallel builds are running on the same build machine at the same time this can cause conflicts (dealing with the same shared resource)

The problems described above can be avoided with Register-PSRepository operating on session level. Let me know if you have any questions.

Thanks,
Nedko

Activity

  1. Glober777 commented on Dec 26, 2017

    @Glober777

    It would be also great if there was a scope option to register PSRepository on a system-wide level

  2. added this to the vNext milestone on Sep 4, 2020
  3. SydneyhSmith commented on Aug 1, 2023

    @SydneyhSmith
    Collaborator

    Does being able to install to a specific location solve this scenario?

  4. SydneyhSmith commented on Aug 1, 2023

    @SydneyhSmith
    Collaborator

    Thanks Gilbert Sanchez (@HeyItsGilbert) that use case makes sense to me for a system wide registration, I am wondering if the use case for a session scope registration is covered?

  5. HeyItsGilbert commented on Aug 1, 2023

    @HeyItsGilbert

    Sorry, I deleted my comment because I re-read the original request and realized that this request was specifically for a per Session scope.

    If Publish Module allowed you alternatively specify a repo like data structure that might solve f0rt's issue. Publish-Module Foo -Repo @{'Name' = 'My Repo'; 'Url' = 'myurl.com' }. No need to confirm of anything pre-existing and no clean up after the fact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions