Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

How do deployments get recorded for a ProGet package?



  • We use a home-grown tool in place of NuGet.exe to install our NuGet packages (because NuGet.exe doesn't allow us to have multiple copies of the same package on the same server). It would be cool if we could report back to the ProGet feed that this package was installed. What triggers a deployment to get recorded in a feed? Thanks.

    Product: ProGet
    Version: 4.7.13



  • This is handled via additional HTTP headers sent w/ the GET request for the package. Here are the supported ones:

    • X-ProGet-Deployment-Application - (Required) - the application or tool doing the deployment e.g. NuGet, BuildMaster, Some Custom Tool
    • X-ProGet-Deployment-Description - (Required) - brief summary of deployment
    • X-ProGet-Deployment-Target - (Required) - string that identifies where the package was installed, typically the server name
    • X-ProGet-Deployment-Url - (Optional) - URL that links to more information about the deployment
    • X-ProGet-Deployment-UserName - (Optional) - name of the user performing the deployment, defaults to authenticated user
    • X-ProGet-Deployment-Date - (Optional) - ISO 8601 UTC date of deployment, or current date if not supplied


  • Hi,

    It works well with NuGet but It doesn't work with npm :

    GET http://swdafrwnetv84.cib.net:80/npm/NPM-Int/angular/-/angular-1.6.10.tgz HTTP/1.1
    connection: keep-alive
    User-Agent: node-fetch/1.0 (+https://github.com/bitinn/node-fetch)
    X-ProGet-Deployment-Application: TestApplication
    X-ProGet-Deployment-Description: A description
    X-ProGet-Deployment-Target: target.dtc.com
    npm-in-ci: false
    npm-scope: 
    npm-session: d0cacdb74913b43b
    referer: install
    pacote-req-type: tarball
    pacote-pkg-id: registry:angular@http://swdafrwnetv84.dtc.net/npm/NPM-Int/angular/-/angular-1.6.10.tgz
    Accept: */*
    Accept-Encoding: gzip,deflate
    Host: swdafrwnetv84.cib.net:80
    

    Thanks for your Help.

    Regards

    Fabrice



  • Work now since 5.0.13



  • I've been searching all over the internet and can't find an answer; is there a way to configure nuget.exe to pass custom headers in the requests or do you need to basically write your own tooling to do so?


  • inedo-engineer

    Hello,

    @mhull_0872 your timing is perfect. While currently it requires custom headers, we are implementing a simple REST API right now that will be allow you to add custom deployment records. Here is the associated issue: https://inedo.myjetbrains.com/youtrack/issue/PG-1666

    It's planned to be included in the 5.2.26 release due out next Friday.

    Hope this helps,
    -John


  • inedo-engineer

    Hi @mhull_0872,

    We just released the latest version of ProGet 5.2.26 on 2/28/2020 which includes the new Package Deployment API. You can learn more about the package deployment tracking feature here. We also have documentation on how to use the API endpoint here.

    Thanks,
    Rich



Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation