com.atlassian.bamboo.plugins

Dzmitry Mandryk October 7, 2024

HI, i am using the Bamboo API to start build and pass customVersion to use it as variable just to send some notifications after build/deployment is done.
I don't really need too checkout specific Git version.

the request: http://bamboo.local.com/rest/api/latest/queue/BOO-OVB?customRevision={{version.name}}

Build starts, but fails, as it can't find the revision, obviously.

How to ignore the version please and only use it as variable.
Or there any other way to pass variables to Bamboo DC from Jira Cloud?

This error may have occurred due to an authentication issue with Bitbucket Server. to refresh the authentication details or manually add the access key visible in "Advanced" section to Bitbucket Server.
(com.atlassian.bamboo.plugins.stash.repository.StashRepositoryException : com.atlassian.bamboo.plugins.git.GitCommandException: command [/usr/bin/git branch -a --contains 2024-10-08-1 master] failed with code 129. Working directory was [/var/atlassian/application-data/bamboo/local-working-dir/_git-repositories-cache/f79a6344d3460d3f1c5fe4d49197879fbcd36bdb]., stderr: error: malformed object name 2024-10-08-1)

1 answer

1 accepted

4 votes
Answer accepted
Shashank Kumar
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 7, 2024

Hello Dzmitry,

Welcome to Atlassian community

1. You'll need to define the variable which you want to pass as either global variable in Bamboo or a plan variable in Bamboo.

2. You need to use bamboo.variable.myVariable=valueForMyVariable to the Post API, here myVariable is the variable which is defined in Bamboo for which you'll pass the value when calling from Jira cloud

see example below, here jira is a plan variable which I have defined in Bamboo and when I am calling this API, I am passing a value of 9

curl --request POST \
--user bamboo:bamboo \
--url 'http://bamboo964:8085/rest/api/latest/queue/SCRIP-TIC?bamboo.variable.jira=9' \
--header 'Accept: application/json'

Regards,

Shashank Kumar

**please don't forget to Accept the answer if your query was answered**

Dzmitry Mandryk October 7, 2024

yes, it works, thanks a lot @Shashank Kumar !

Like Shashank Kumar likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events