Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-20589

Bamboo Repository Tag task to support forced tag creation

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • None
    • Repository (Git), Tasks
    • None
    • 1
    • 1
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      As a developer, I would like to have the option to force the creation of a tag, i.e. re-tagging, with the "Repository Tag" task.

      At the moment, once a tag exists on the remote repository, recreation of the same tag fails with something like this 

      Bamboo task log

      simple 22-Aug-2019 11:50:40 Starting task 'Tag the build as latest version' of type 'com.atlassian.bamboo.plugins.vcs:task.vcs.tagging'
      simple 22-Aug-2019 11:50:40 fatal: tag '"7.7"' already exists
      error 22-Aug-2019 11:50:40 Error occurred while running Task 'Tag the build as latest version(5)' of type com.atlassian.bamboo.plugins.vcs:task.vcs.tagging.
      error 22-Aug-2019 11:50:40 com.atlassian.bamboo.task.TaskException: An error occurred while tagging a repository
      ...
      error 22-Aug-2019 11:50:40 Caused by: com.atlassian.bamboo.plugins.git.GitCommandException: command [/usr/bin/git tag "7.7" 813679c581791b975523fb4bd8de38aac91b05d0] failed with code 128. Working directory was [/app/bamboo/bamboo_agent/xml-data/build-dir/RE-CRU-JOB1]., stderr:
      error 22-Aug-2019 11:50:40 fatal: tag '"7.7"' already exists

      It is not possible to circumvent this limitation by manually manipulate the local / cache repository, to try removing that tag prior to (running `git tag -l 7.7` returns nothing, so `git tag -d 7.7` would have failed regardless).

      The scenario is analogous to updating "latest" tag of docker images. Consider that a branch "release-7.7" exists, and patch release for that "release-7.7" will be tagged as "7.7.1", "7.7.2", etc. For client of this artifact who simply wishes to track the latest 7.7.x they simply look at tag "7.7" and retrieve the latest "7.7".

              Unassigned Unassigned
              alick.leung2 LoneGumMan
              Votes:
              17 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: