Using the octo.exe tool we have an issue with creating releases via the API. We have several TeamCity agents building different git branches of our code and so have different version numbers in each branch. e.g. Production environment may have version 202.1234 and our staging environment has version 203.4567. We make a fix to 202.1234 which now becomes version 202.1235. Calling the API to create a release for version 202.1235 will create a release for version 202.1235 but choose to use the nuget package on the server for version 203.4567 which is the latest nuget package on the file share (using local file path C:\LocalNuGetFeed as nuget feed).
How to reproduce this problem:
- Create a nuget package for version 203.4567.
- Create the release: octo.exe create-release --server=http://myserver.com/api --project=“My Project Name” --version=203.4567 --apiKey=ABC123
- Create a nuget package with a smaller version number. e.g. 202.1235.
- Create the release: octo.exe create-release --server=http://myserver.com/api --project=“My Project Name” --version=202.1235 --apiKey=ABC123
- Go to the Octopus Deploy website and view the 202.1235 release. The name of the release is 202.1235 as expected but the nuget package it will deploy is version 203.4567.
Ideally I want the API to use the nuget package with the same version as the version I pass to octo.exe. Alternatively another parameter to specify the exact version of the nuget package to use with this release, not just pickup the lastest nuget package in the folder.
Is there a fix/workaround for this issue? We have several TeamCity agents building at the same time, so deleting existing nuget packages or moving them temporarily isn’t really an option.
Thanks for your assistance.