krosenvold/bgit

Add support for tagging

Opened this issue · 3 comments

Implementation of post-build tagging and the ability to specify a tag from which to build would make this plugin even more useful. Supporting laddered environments is difficult without it.

For example, the build for the "integration testing" environment needs to be able to spawn a tag, from which "user acceptance testing" environment builds. This isolates UAT from changes to master that occurred after the integration environment was built.

This is easily supported with Bamboo's built-in post-build tagging option for SVN. Perhaps this plugin could leverage that existing feature's UI and wire in the necessary git commands on the back side. Also, a new field would need to be added to the Source Repository tab for which tag to build from.

I believe you can build from tags already, but just putting it as the branchname.

Patches that implement post-build tagging are welcome.

Actually, I just tried to build from a tag by doing exactly what you suggested above, and it resulted in the stack trace here: http://build.springsource.org/admin/viewError.action?buildKey=INT-RELEASE&error=47

"Caused by: edu.nyu.cs.javagit.api.JavaGitException: The branch origin/latest-release does not exist"

In the meantime, then, we're going with a rather ugly hack of having a 'floating branch' (latest-release-bgit) that must be moved to point to the latest-release tag (git branch -f latest-release-bgit latest-release; git push origin latest-release-bgit:latest-release-bgit).

Could we see a fix here? Even if it's as simple as allowing for a branch or tag name in the same field. Anything is better than this 'floating branch' hack. Thanks.

For reference, the following issue for the Spring Gradle build is pending implementation of this checkout-by-tag feature in bgit: https://issues.springsource.org/browse/GRADLE-24