Hello,
What is the proper syntax for the body parameter when you have NuGet packages and you need to specify the version numbers? Can I have an example of what it would look like please?
Hello,
What is the proper syntax for the body parameter when you have NuGet packages and you need to specify the version numbers? Can I have an example of what it would look like please?
Hi Heath,
Thanks for getting in touch! So I am assuming you are talking about the create-release command using octo.exe.
We have a documentation page with samples: http://docs.octopusdeploy.com/display/OD/Creating+releases
So either you need to use --packageversion 1.3.0
where this will use 1.3.0 for ALL packages in the step, but will error if it can’t find them all with that version.
Or you need to use --package Stepname:1.0.3 --package Stepbelow:1.2.2
for each package by step name.
Hope that helps! if you aren’t referring to octo.exe could you expand on where you need this information for?
Vanessa
Hi Vanessa,
Thank you for responding. I am not using octo.exe. I am using the Octopus Deploy API. The website link is: https://github.com/OctopusDeploy/OctopusDeploy-Api/
In particular, I am looking at the release section. I has requirements that need to be fulfilled in order to process. Below is the information I am looking at on the page. The last bullet point is my problem. How do I go about specifying a version for a NuGet package? I specify a version for the new release but it always returns with a Bad Request error. I am assuming that is the reason because if I make a release for a project without a NuGet package, it works perfectly fine. I am just trying to make a release, not deploy or anything.
POST /api/releases HTTP/1.1
Creates a new release.
Notes:
-Users must be authenticated with an API key to perform this action.
-Access is restricted to users in teams with ReleaseCreate permission covering relevant projects.
-You must set the ProjectId field to a valid project. A snapshot of the deployment process and variables will be created.
-A version must be specified for every included NuGet package.
Thank you.
Hi,
Thanks again for reaching out. Please check this gist to see how to specify the package versions
On this example i’m creating a release for a project that has 2 deployment steps (see attached screenshot). You’re gonna need to modify the SelectedPackages
node accordingly for your projects depending on how many deployment steps they have.
Hope that helps!
Dalmiro
Awesome! Thank you Dalmiro! You just saved me after struggling for quite some time. Virtual high five!