Hello,
I’ve run across an issue attempting to re-deploy a release from TeamCity. I’m setting --force
and I’ve defined the OctopusForcePackageRedeployment variable to “true” with no scope in my Octopus project. When TeamCity kicks off the deploy using Octo, it reports errors like
"Release number '1.1232.30' has already been used for this project, please choose a different version number."
Here is the full text of the call to octo.exe:
[00:42:58]Step 1/1: OctopusDeploy: Release (OctopusDeploy: Release) (1s) [00:42:58][Step 1/1] Octopus Deploy (1s) [00:42:58][Octopus Deploy] Running command: octo.exe create-release --server="http://octopus/" --apikey=SECRET --project="Redacted" --enableservicemessages --version="1.1232.30" --deployto="QA" --waitfordeployment --packageversion=1.1232.30 --force [00:42:58][Octopus Deploy] Creating Octopus Deploy release [00:42:58][Octopus Deploy] Octopus Command Line Tool, version 1.1.17.62 [00:42:58][Octopus Deploy] [00:42:58][Octopus Deploy] Finding project: Redacted [00:42:58][Octopus Deploy] Handshaking with Octopus server: http://octopus/api [00:42:59][Octopus Deploy] Handshake successful. Octopus version: 1.6.3.1723; API version: 2.0.0 [00:42:59][Octopus Deploy] Finding environments... [00:42:59][Octopus Deploy] Finding steps for project... [00:42:59][Octopus Deploy] Release plan for release: 1.1232.30 [00:42:59][Octopus Deploy] Steps: [00:42:59][Octopus Deploy] # Name Version Source [00:42:59][Octopus Deploy] --- ------------------------------ --------------- ------------------------------------ [00:42:59][Octopus Deploy] 1 Deploy TeamCity build NuGet package 1.1232.30 User specified [00:42:59][Octopus Deploy] [00:42:59][Octopus Deploy] Creating release... [00:42:59][Octopus Deploy] Bad request { [00:42:59][Octopus Deploy] "errors": [ [00:42:59][Octopus Deploy] "Release number '1.1232.30' has already been used for this project, please choose a different version number" [00:42:59][Octopus Deploy] ] [00:42:59][Octopus Deploy] } [00:42:59][Octopus Deploy] System.Exception: Bad request { [00:42:59][Octopus Deploy] "errors": [ [00:42:59][Octopus Deploy] "Release number '1.1232.30' has already been used for this project, please choose a different version number" [00:42:59][Octopus Deploy] ] [00:42:59][Octopus Deploy] } [00:42:59][Octopus Deploy] at OctopusTools.Client.OctopusSession.ReadResponse(WebRequest request) [00:42:59][Octopus Deploy] at OctopusTools.Client.OctopusSession.Create[TResource](String path, TResource resource) [00:42:59][Octopus Deploy] at ProjectExtensions.CreateRelease(IOctopusSession session, Project project, IList1 latestVersions, String version, String releaseNotes) [00:42:59][Octopus Deploy] at OctopusTools.Commands.CreateReleaseCommand.Execute() [00:42:59][Octopus Deploy] at OctopusTools.Infrastructure.CommandProcessor.Process(String[] args) [00:42:59][Octopus Deploy] Octo.exe exit code: 2 [00:42:59][Step 1/1] Unable to create or deploy release. Please check the build log for details on the error. [00:42:59][Step 1/1] Step OctopusDeploy: Release (OctopusDeploy: Release) failed
Can anyone tell me what I’m doing wrong here? Thanks in advance!
Nate