Old artifacts are not deleted

Hi all,

We accidentally used a "wrong" versioning scheme for our releases, so the first month or so builds/artifacts were created with 1.0.x version numbers. Now we've switched to 1.0.0.x, and I used the "trick" described by others to set the clean-up rules to 1 day or 1 build to get everything cleaned up. However, for some reason one of the four build steps that generate nuget packages has "left" two artifacts in the repository with the old numbering scheme, so when I try to create a new release in Octopus Deploy, the old release is used by default, as the version is (wrongly) newer.

Currently we've been building 1.0.0.93, previously 1.0.0.92 etc. But Octopus deploy sees the following when browsing the artifact feed

Backend release
- 1.0.0.93
- 1.0.0.92

Backend debug
- 1.0.0.93
- 1.0.0.92

Frontend release
- 1.0.754 <---- appears as "newer" due to the old/wrong number format
- 1.0.708
- 1.0.0.93
- 1.0.0.92

Frontend debug
- 1.0.0.93
- 1.0.0.92


also, the attached package feed extract shows how the old versions appear.

Browsing the Teamcity artifacts folder on disk shows only the two newer builds, not the old ones.

I can't see the old builds (1.0.754 and 1.0.708) in the build history, so the "build" itself is removed, just not the artifacts.

I can't remove the two old artifacts - no matter how I've set the project cleanup settings, it just isn't possible for me to delete them.

How do I fix this? Create a completely new project and hope that deleting the old projects will empty the artifacts list in the database?

I would be OK to completely clear the entire database for this project - alternatively I might just have to up the version to 1.1 and live with that.

Ideas are very welcome :)

Best regards
Jan Hansen



Attachment(s):
package feed extract.xml
4 comments
Comment actions Permalink

Hi Jan,

Please try to force re-index of incorrect build as described in this comment. Also please point out what TeamCity version do you use?

0
Comment actions Permalink

Hi Alina

Thanks for your reply. We use Teamcity 9.0.1. Sorry for not mentioning that, I actually wrote it, but decided to move it to another part of the post, and then forgot to paste it :)

The post you refer to specifies:

By default TeamCity will not re-index older builds. To add a build into the index, navigate to the following url: http://<TEAM_CITY>/ajax.html?reindexMetadataBuildId=<BUILD_ID> to make all .nupkg files from build <BUILD_ID> be visible in the TeamCity's NuGet feed

From the feed extract I attached I was able to guess that the relevant build IDs were 263 and 632 (for 1.0.708 and 1.0.754 respectively) which I used as <BUILD_ID> in the specified url. The response from teamcity was <response>Build metadata updated</response> in both cases. I then restarted the TeamCity Server service and refreshed the view in Octopus deploy, but the packages still appear in the list.

Any other ideas?

Is there any easy way of browsing the Teamcity artifiact repository?

Best regards
Jan Hansen

0
Comment actions Permalink

Please try to reset cache using Diagnostic > Caches > buildsMetadata Reset link. If it does not help then please attach teamcity-server.log file.

0
Comment actions Permalink

YES! that did it - thank you :)

Best regards
Jan Hansen

0

Please sign in to leave a comment.