What is the best way to automate adding a tag to a branch and changing the permission of the branch (read-only)? I need to do this to automate a release process across multiple Stash repo branches.
Community moderators have prevented the ability to post new answers.
Hi Tom,
You could write a script that creates and pushes a tag over HTTPS/SSH and then restricts the branch via the branch permissions REST API, but I'd consider whether you really need to lock the branch?
Once you create a tag, it is fixed pointing a particular commit, so as long as your release process is using tags you don't have to worry if the branch the tag was originally created on is updated or not. You could even experiment with the Ref Change Settings plugin from Atlassian Labs (though you'll have to build it from source) if you wanted to ensure tags are not updated in your repository.
cheers,
Tim
Hi Tim,
Yes, this makes sense and I am proceeding to use git annotated tags to define the release. Are there plans to add the release concept in Stash and tie into Jira and Bamboo? GitHub has this capability today:
https://github.com/blog/1547-release-your-software
Thanks,
Tom
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bamboo supports storing artifacts for you (or pushing them to a separate host after being built), but we don't have "releases" as a first class concept in Stash at the moment. That said, we're always keen for feedback - I'd recommend raising a feature request in the Stash project at https://jira.atlassian.com
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, I added this feature request:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nice, you have my vote. If you're happy with this answer would you mind marking it as accepted?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.