Movable singleton pin and tag
In most of my feature branches, there is only ever one pin, which has a fixed tag that always goes with it. Other projects that import artifacts use this tag to identify the designated build. So it's similar to the `lastSuccessful` keyword, except that in some cases the pin/tag remains behind the latest builds, even if they are successful. If a second build ever gets the tag, it creates significant confusion, because the role of the tag is to identify exactly one build for importers to select.
Is there a way in the TC web UI to move a pin/tag in a single operation? Currently it takes 3 steps to move a pin/tag to a more recent build:
- pin the new build
- carefully type in the same tag (or scroll through hundreds of tags to find it in the list)
- unpin the prior tagged build, manually clicking the tiny “X” to remove the tag
What makes this especially tedious is that the button for actions on a build is very tiny and has no click zone whatsoever. It is required to pinpiont the mouse exactly on a pixes of the 3-dot icon, otherwise the build row is expanded into a small panel and no actions menu pops up. Since this action needs to be done between 10 and 100 times per day, it would really be preferable to have some way of moving the pin/tag together onto another build, where “move” means:
- make no change of any kind to the tag
- remove the pin and the tag from the prior build while attaching them to the new build
If there is a way to accomplish this in the latest version of TC onsite, suggestions are welcome! Otherwise please consider it a feature request.
Please sign in to leave a comment.
Currently, there is no built-in option in the TeamCity web UI to “move” a pin and tag in a single step. As a workaround, you can implement a script that uses the REST API to manage pins and tags:
- pin build (https://www.jetbrains.com/help/teamcity/rest/manage-finished-builds.html#Pin+Build)
- Manage tag (https://www.jetbrains.com/help/teamcity/rest/manage-finished-builds.html#Manage+Build+Tags).
If your actual goal is to always use the latest successful artifacts, consider using:
- Snapshot dependencies (https://www.jetbrains.com/help/teamcity/snapshot-dependencies.html)
- Artifacts dependencies (https://www.jetbrains.com/help/teamcity/snapshot-dependencies.html)
Finally, keep in mind that the main purpose of pinning a build is to prevent it from being deleted by cleanup. If you only need to preserve the last successful build, you can also configure an appropriate cleanup policy(https://www.jetbrains.com/help/teamcity/teamcity-data-clean-up.html).
Best Regards,
Tom