Requirements:
- Build runs in a docker container
Usecase:
1. I have 10 builds that builds an artifact that is shared with the deployment
2. In the deployment I download the artifact and want to upload it into an artifact repository.
3. Now I deploy build #7 out of the 10 builds.
4. I want to tag the commit that was used at build #7 to build my artifact but the tagging needs to happen in the deployment.
How do I do that?
I am able to tag in an deployment but I have no way to push the tag.
That code is able to create a tag on my specific commit:
export TAG_HASH=384a34eaa1c1ee58ce198fabd95831dddd3cc4b8
export TAG_NAME=0.0.1
git tag -a ${TAG_NAME} ${TAG_HASH} -m "${TAG_HASH}"
echo "Tag done"
Hence our bamboo uses ssh keys with bitbucket and I use a container build I am not able to push via my script.
The only way to push is with the bamboo task vsc push. But with that task it does not push git tags as well.
And the other option to use the bamboo task "git tag" I can only tag the latest commit, so that is also no option for me.
How can I solve this?
Hi @Philipp ,
Welcome to Atlassian Community!
We understand that you want to tag a specific commit in the remote repository from Bamboo through a script task.
We have a below Bamboo KB article which explains the same and how to setup ssh keys to authenticate remote repository through script task.
Please also refer to the KB article for a more detailed explanation of How to set up an SSH key-pair for a Bitbucket repository from Bamboo. Even though it explains for the Bitbucket Cloud repository same steps mentioned under the section To generate SSH key-pair: can be followed for generating SSH key pair for the Bitbucket server repository as well.
I hope this helps!
Best Regards,
Jyothi
*please don't forget to Accept the answer if your query was answered**
I know that is an option but than I have to handle a secret myself and make sure the keys are in all repos that I want to tag.
A more comfortable way would be to enable the internal bamboo task "Repository Tag" to have a parameter that uses the hash to tag of a specific commit. So bamboo can use the existing keys generated by the linked repository.
Is there maybe already a ticket for that feature that I can upvote?
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.