When using octo.exe to create a release, I can’t rely on it just using the latest version of the package in the repository, as I’m using tags. I’d rather not specify a specific version number as an argument, and looking at the octo.exe options, there is an argument “–packageprerelease=VALUE”. Am I right in saying I could use this to, say, pick the latest version of a package that has a ‘beta’ or ‘rc’ tag in its version? It gives me the following error, sadly:
2016-02-25T12:51:04.1340071Z Finding latest NuGet package with pre-release ‘beta’ for step: Deploy Web Files
2016-02-25T12:51:04.1965082Z Could not find any packages with ID ‘’ in the feed ‘octopus://’
Thanks for getting in touch. You are correct, you should be able to use the --packageprerelease argument to select package versions that match the specified tag.
All of the packages must have a special version that matches the tag. For example if you are using --packageprerelease=beta you should have packages:
Thanks for the reply Shane. I’ve tried this but it doesn’t seem to work for me. Here is my Octo.exe output:
Handshake successful. Octopus version: 3.2.20; API version: 3.0.0
Authenticated as: Team Foundation Server <> (a service account)
Finding project: MyProject
Finding channel
Finding deployment process for project: MyProject
Finding release template...
Resolving NuGet package versions...
Finding latest NuGet package with pre-release 'beta' for step: Deploy Web Files
Could not find any packages with ID 'MyProject.Web' in the feed 'octopus://'
Using version number from package step.
The step 'Deploy Web Files' provides the release version number but no package version could be determined from it.
I can confirm that I have a number of packages in my library with the right tag, e.g.:
Just by deploying to the “beta” channel you should only get releases for packages that have the “beta” tag.
If you do no specify --channel or ‘–packageprerelease’ when you call octo.exe are you able to create a release?
In one of the logs you sent it can’t find the package “MyProject.Web” and you have indicated that you have the packages “MyPackage.Web” in your feed. They are not the same package. Could that be what is causing the error?
Are your packages in the built-in Octopus NuGet feed?
The mismatch in names between MyProject and MyPackage is just a typo by me, apologies.
A good example of this not working for me is as follows:
octo.exe create-release --project="CourseSight" --server=http://mk-octopus/ --apiKey=API-1234 --channel="Beta"
Octopus Deploy Command Line Tool, version 3.2.0.91
Handshaking with Octopus server: http://mk-octopus/
Handshake successful. Octopus version: 3.3.0; API version: 3.0.0
Authenticated as: Team Foundation Server <> (a service account)
Finding project: CourseSight
Finding channel
Finding deployment process for project: CourseSight
Finding release template...
Resolving NuGet package versions...
Finding latest NuGet package for step: Deploy Web Files
Finding latest NuGet package for step: Deploy Database
Using version number from package step.
Release plan for release: 0.14.0-rc1
Steps:
# Name Version Source
--- ------------------ --------------- ------------------------------------
1 Deploy Web Files 0.14.0-rc1 Latest available in NuGet repository
2 Deploy Database 0.14.0-rc1 Latest available in NuGet repository
Creating release...
Error from Octopus server (HTTP 400): There was a problem with your request.
- Release '0.14.0-rc1' already exists for this project. Please use a different version, or look at using a mask to auto-increment the number.
Exit code: -7
Before I executed this step, I had current releases of 0.14.0-beta4 in the Beta channel and 0.14.0-rc1 in the RC channel.
Here I am specifying the creation of a release in the beta channel (0.14.0-beta5 exists as a package), yet it is looking at rc-tagged packages to try and create the release.
I think that last log you sent through holds the key. I tried creating a release to a channel with Octo.exe version 3.2.0.91 and had the same result you are getting.
Sorted. Thanks so much for getting to the bottom of this.
As an FYI, the version of octo.exe I was using is the one bundled in to the TF Build vNext “Create Octopus Release” task - you might want to push out a new version of this.