Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for NuGet Promotion #199

Open
sebastiengamby opened this issue May 15, 2023 · 0 comments
Open

Support for NuGet Promotion #199

sebastiengamby opened this issue May 15, 2023 · 0 comments
Labels
feature request New feature or request

Comments

@sebastiengamby
Copy link

Is your feature request related to a problem? Please describe.
I need a NuGet promotion functionality similar to the one provided by ProGet

Describe the solution you'd like to see
When promoting a build that contains a NuGet artifact whose version number is a pre-release one (e.g. 1.2.4-RC-1), a new package is created than it is identical to the first with the exception of the version number that is a stable one (e.g. 1.2.4). This new package is placed in the target repository and when consulting the build details, it now appears in the related artifacts.

Describe alternatives you've considered
I have managed to address almost fully the issue with two scripts. The first one is a Powershell script executed by a build agent that

  • Download the NuGet package to be promoted
  • Unzip it
  • Modify the nuspec file by editing the version number (e.g. 1.2.4-RC-1 to 1.2.4)
  • Create a new NuGet package
  • Upload the package
  • Call the user plugin script
    The user plugin script does the following:
  • Retrieve the detailedBuildRun
  • Add the newly created package to the list of artifact of the module whose name matches the buildName
  • Add the fileInfo of this newly created package to the list of artifactFiles of the detailedBuildRun
  • Copy the VCS properties of the original package to the new one
  • Add a release status to the buildRun
    This solution is almost correct because when consulting the details of the buildRun in the Artifactory UI, the newly created artifact is presented but the RepoPath link is undefined.
    nuget.groovy.txt

Additional context
I have added the scripts and a screenshot of the issue. This is also related to the JFROG support ticket 250742

promo.ps1.txt
nuget.groovy.txt
BuildRunModuleDetails

@sebastiengamby sebastiengamby added the feature request New feature or request label May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant