Overwrite existing release in Octopus

I am using Octopus Cloud PaaS and plugin with teamcity.

For step (OctopusDeploy: Create release) in teamcity I am getting below error where release already exists.

[00:02:29][Octopus Deploy] Creating release…
[00:02:29][Octopus Deploy] There was a problem with your request.
[00:02:29][Octopus Deploy]
[00:02:29][Octopus Deploy] - Release ‘hf.website.4.8.0’ already exists for this project. Please use a different version, or look at using a mask to auto-increment the number.
[00:02:29][Octopus Deploy]
[00:02:29][Octopus Deploy] Error from Octopus Server (HTTP 400 BadRequest)
[00:02:29][Octopus Deploy] Exit code: -7
[00:02:29][Octopus Deploy] octo exit code: -7

Is there a way I can ignore this error and overwrite the release in Octopus?

I tried the --ignoreExisting flag but this does not overwrite the existing release.

[03:01:37][Octopus Deploy] Checking for existing release for Hf Cloud hf.website.4.8.0 because you specified --ignoreExisting…
[03:01:38][Octopus Deploy] A release of Hf Cloud with the number hf.website.4.8.0 already exists, and you specified --ignoreExisting, so we won’t even attempt to create the release.
[03:01:38][Octopus Deploy] octo exit code: 0

Hi @vaibhavn,

Thanks for getting in touch! Octopus doesn’t have an option to overwrite releases, we generally consider releases read-only. The –ignoreExisting flag is to avoid attempting to create a release if one already exists.

Is there some limitation requiring you to overwrite your existing releases? Octopus is designed with the idea of rolling forward with release, if something changes in a release, we expect a new release version to be provided and a new, separate release to be created.

If you have any questions or further thoughts on this, please don’t hesitate to let me know.

Best regards,
Daniel

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.