youngmon/atlassian-qna huggingface dataset:
bamboo injection variable
Asked by Gretchen:

I currently use the injection variable plugin (Bamboo 5.3). We are planning on upgrading to Bamboo 5.7 which contains this feature natively (according to the material I've seen, at least that's how I interpreted it.) Will I need to modify my builds that currently use the plugin version in any way to use the "built in" injection variable functionality?

Thanks,

Gretchen


Answers:
author: Marcin Gardias
body: The functionality bundled with Bamboo is the newest version of plugin that was previously available separately and it should work without any changes to Plan configs.

One thing I would suggest though, is to uninstall the 'external' plugin prior to upgrading to 5.7 (this will not affect your plans, it will just remove the old plugin classes from the system)

comments: author: Gretchen
body: Also should note that it will require you to enable the new system installed plugin after the upgrade. This wasn't called out anywhere and it is installed disabled.
Bamboo linked repositories and plan status suppression
Asked by john livingston:

When a plan uses a linked repository, is it possible to disable build/plan status to stash for the plan?

For example, two plans, A and B use the same global linked repository X. By default, both plans relay pass/fail status to stash. However, only status from plan A is desired for stash.

Is it possible to disable pass/fail status from plan B to stash?


Answers:
author: john livingston
body: This is not yet configurable. [BAM-17542](https://jira.atlassian.com/browse/BAM-17542) requests this functionality.
How to integrate Bamboo build plan with Jenkins test job?
Asked by Shai:

Hi

We use Bamboo On Demand to build and deploy our projects.

We also use a local Jenkins to run Selenium Webdriver tests on a deployed system.

Now, i want to be able to automate the flow:

1. Build a project
2. Deploy to sandbox
3. Trigger Jenkins to run the tests
4. Bamboo build should pass / fail according to tests results retrieved from Jenkins

Questions:

1. How to trigger Jenkins ? I know i can use the script task and call Jenkins API. Any better way?
2. Once I triggered Jenkins, how Bamboo knows when test task complete?
3. How can Bamboo fetch the tests results from Jenkins? I know it have a Junit parser task, Not sure how to fetch the XML result file generated in Jenkins to Bamboo. Again, Jenkins provide API to fetch results can I use it and just parse the result my self in another bamboo script?

Thanks !


Answers:
author: Ankuskum
body: Hello,

Was there a solution for this issue to call Jenkins test job from Bamboo??

Thank you,


author: Rodolfo
body: Can you setup the Selenium web driver tests within Bamboo itself using a command line interface?

comments: author: Shai
body: My test must run on Win / Mac OS. Last time i tried to run the tests from Bamboo itself it failed because it was impossible to use Bamboo's agent on my machines.


Tags: cloud
Bamboo/JIRA integration based on branch name?
Asked by Colin Cornaby:

We have JIRA/Bamboo/Stash running together. I've noticed that JIRA will only link to Bamboo and Stash seemingly only if the issue is mentioned in a commit. We're using the issue key as part of the branch name, and while JIRA will link the branch, we don't see any additional linkage of commits under that branch or builds based off that branch to JIRA.

Is there a way to get Stash and Bamboo to forward information into JIRA based on the branch name and not just commits?


Answers:
author: Colin Cornaby
body: Some of the branches are being created from JIRA, but some are not. We just performed our JIRA integration. However, all of the branches contain the issue key.

Last I checked, the application links were intact. If I mention the issue key in a commit, everything works. But the issue key has to be mentioned in a commit for this to work.


author: Susant Prusty
body: In the application links intact ? if you have upgraded to any new verison then you have to re-create the application link to make it work properly.

You must be doing that , but just curious to ask are you creating the branches from JIRA and for all commits are you using the issue key as commit message ?

Thank you

Regards,

Susant


author: Colin Cornaby
body: We're using JIRA 6.3.13. That's correct, I'm referring to the development panel. Despite the branch name containing the issue key, I'm only seeing builds appear in the development panel when he commit that triggers the build mentions the issue key.


author: Susant Prusty
body: Are you referring to the development pane in JIRA ? what version of JIRA you are using ?

Thank you

Regards,

Susant


author: Colin Cornaby
body: I realized I've brought Stash into this, but I'm primarily interested in Bamboo build information right now.


Tags: bamboo-administration
The build is not capable of being run because no agents are available.
Asked by Igor Zhivotov:

The job has failed to be run and subsequently queued. Bamboo stated "No agents are available to build this job. This job can be run on an elastic agent by starting a new elastic instance.".

A new instance also failed to be launched with Bamboo showing an error "Failed to start elastic instances: Error when starting a new instance".

Bamboo is showing that it has detected one error "Unable to detect changes".

Any ideas are much appreciated.


Answers:
author: Igor Zhivotov
body: The solution has been simple. Our AWS subscription has falled because of the payment problem. Now we have recreated a new Amazon account for the elastic instance. Sometimes everything is even simplier that you could imagine.


author: Rodolfo
body: Can you enable the Agent manually and make sure that it's active before starting the build?


author: Igor Zhivotov
body: This is the only log I have. The log showing general Bamboo error is crashed and is not subject to encoding.


author: Igor Zhivotov
body: Jan 6, 2015 4:28:20 PM Elastic instance \[i-23aafadd\] transitioned from RUNNING to UNKNOWN.Jan 6, 2015 4:28:20 PM Detected that the elastic instance \[i-23aafadd\] has been terminated.Jan 6, 2015 4:28:20 PM Elastic Agent "Elastic Agent on i-23aafadd" stopped on instance i-23aafadd


author: Alex Medved _ConfiForms_
body: Probably a stacktrace will shed some lights on what is going on. Could you get the logs?


Tags: cloud
Bamboo upgrade and Java version in agents
Asked by Xabier Davila:

I've just upgraded my Bamboo server from 5.6 to 5.7.2. This upgrade requires a Java upgrade from 6 to 7 in the server.

What happens with Java in the agents? At the moment, they have Java 6 installed, so I assume they will need to be upgraded as well. Is this mentioned anywhere in the docs?.

Also, how can we know what version an agent is running? As per Atlassian documentation, agents are updated automatically, but it would be good to get some documentation regarding this process so we can troubleshoot. IE: what if the automatic upgrade fails?


Answers:
author: Przemek Bruski
body: You don't need to upgrade Java for 5.7.2, we still support Java 6. We will stop supporting both 6 and 7 sometime later this year and then you'll have to upgrade to 8.

You can also use different versions of Java on agent and server without any problems, provided that all versions in use are supported.


Tags: bamboo-administration
How to transform Bamboo variables?
Asked by Pascal:

Is there any way to transform Bamboo variables?

We're using Octopus Deploy and we need to supply a version number to the MSBuild process. However, the version number may not be longer than 20 characters. That is a particular problem when using plan branches, since (in order to create unique versions) I need to incorporate some branch identifier, which currently can only be the branch name, which in turn contains the whole JIRA issue description (since we're using the whole JIRA, Stash and Bamboo pipeline). So I need to do some serious trimming, e.g. through regex replacements, getting substrings, etc.

All suggestions are welcome!


Answers:
author: Marcin Gardias
body: You have 2 options but you need Bamboo 5.7 or later. Both exploit the fact that in Bamboo 5.7 it is possible to create variables during build run time and use them later in deployment version name.

Option 1:

Create a script (.bat or powershell) that will do all the things you need. Exploit the fact that all the Bamboo variables are exported as system variables when running Script task. Write the result into a .properties file. Use Inject Variables task to read the properties from the file into Bamboo variables. Make sure to use Result scope. Use the injected variable in version naming pattern for the deployment project.

Option 2:

Instead of using script task + inject variable you can implement custom task plugin that will do the same.


author: Pascal
body: Marcin, thanks for the very quick and to-the-point answer. I went for option 1 and it works! I did have quite a bit of trouble getting it to work across Windows (our build server) and Linux (our Bamboo server): Powershell messes up character encoding. Here's the issue number extraction I went for:

```
$Env:bamboo_planRepository_branchName -match "^(|.+\/)([A-Z]+\-\d+).*" &gt; $nullIf ($matches.count -gt 2) {    $name_value = "jiraIssueNumber=$($matches[2])"    } Else {    $name_value = "jiraIssueNumber=none"    Write-Host "Match count=$($matches.count)"}# THE FIRST write-output IS MANDATORY!# THE FILE STARTS OF WITH INVALID CHARACTERS, WHICH# SCREWS UP THE FIRST NAME VALUE PAIR; HENCE THE DUMMY PAIRwrite-output "foo=bar" | out-file bamboo_extra_variables.txt -encoding utf8write-output $name_value | out-file bamboo_extra_variables.txt -encoding utf8 -append
```

In addition, I had to pass in the bamboo.planBranch.branchName through the environment variables:

```
bamboo_planRepository_branchName=${bamboo.planRepository.branchName}
```
How to generate a war file (Atrifact) by a plan build?
Asked by dileep Kandimalla:

I am trying to generate a war file by a plan build in Bamboo, while trying to do so couldn't able to create a war file using create definition option in artifacts tab as mentioned in <https://confluence.atlassian.com/display/Cloud/Configuring+a+job%27s+build+artifacts>.

Can any one help me out with the input to be give at copy pattern tab in-order to generate a war file.

assume the maven code structure as: TestBamboo

sub directories of TestBamboo : pom.xml, source, target

Now, the code at source should be build and placed in target as war file.

<br />

[](https://community.atlassian.com/t5/Bamboo-questions/How-to-generate-a-war-file-Atrifact-by-a-plan-build/qaq-p/312466?attachment-id=699){#link_1172efee947f0e}  
[](/tnckb94959/attachments/tnckb94959/bamboo-questions/9763/1/ElasticBamboo_war_artifact.docx){#display_1172efee947f0e_0}


Answers:
author: Krystian Brazulewicz
body: I think you're mixing few concepts here.

To generate WAR file is responsibility of your pom.xml (see [Apache Maven WAR Plugin](http://maven.apache.org/plugins/maven-war-plugin/usage.html)).

What Bamboo can do for you is to pick up generated WAR after the build completes and attach it to the build result so you can use it in other builds/deployments or simply download it from the Bamboo UI.


Tags: artefact

build

ear-war
bamboo licences
Asked by Config Manager:

We are planning the expansion of our Bamboo-based build and deployment processes, and have a remote agent licensing question. I have purchased a Bamboo 2-5 remote agent license; does this mean that I can only install (and run) up to 5 remote agents, or that I can install more than 5 but only run up to 5 at a time? If the latter, will Bamboo will just queue a job until a license becomes available (assuming different agents have different capabilities)?


Answers:
author: Config Manager
body: Hi Rafael \& Anthony,

Thank you for your answers; blending them together, I believe that the following is true for the example I quoted:

* I can **install** as many agents as I want.
* I can only **enable** 5 agents at any one time - and hence only **run** 5 concurrently
* To run another agent, I would first have to manually disable one of the existing 5 before manually enabling the new one

Please confirm or correct!

Anthony, thanks for the Add-on suggestion, but although we use VMs I don't think our infrastructure and processes would permit this without a lot of hassle (it would be easier and cheaper to buy more licences!)

Regards,

John

comments: author: rsperafico
body: Hello John,Thank you for your question.Yes, this is correct.---Kind regards,Rafael P. SperaficoAtlassian Support


author: Anthony Kelley
body: Hi John,

Only 5 can be idle and accepting jobs. You can however have as many agents as you want, you would need to start/shut them down manually depending on the capability. The other option is an addon - <https://marketplace.atlassian.com/plugins/com.stiltsoft.bamboo.bamboo-vmware-plugin>

I don't have much experience with it, but could help your cause.


author: rsperafico
body: Hello John,

Thank you for your question.

Based on the example you have provided, you are not allowed to run more than 5 agents simultaneously.

If you find this answer useful, I would kindly ask you to accept it so the same will be visible to others who might be facing the same issue you have inquired.

Thank you for your understanding.

---

Kind regards,  
Rafael P. Sperafico  
Atlassian Support
How to create a unique semantic version number across plan branches with one plan
Asked by Pascal:

I'm looking for a way to create a unique semantic version number across multiple plan branches within one plan. E.g. I have a plan to build Git feature branches. I want each feature being built to get a unique version number. I was using the following setup first:

```
${bamboo.alphaVersion}-alpha${bamboo.buildNumber}
```

The alphaVersion is set manually (e.g. related to a development sprint). The problem with this, though, is that each plan branch starts its own build numbering and thus we will have overlapping version numbers.

I have tried postfixing the number with

```
-${bamboo.planRepository.revision}
```

but this makes the the version number too long, since we're using Octopus Deploy which will only accept version numbers with a maximum length of 20 characters. This could only be a viable solution if I was able to use a substring of this variable's value. But that seems impossible in Bamboo.

I hope someone can help!


Answers:
author: Pascal
body: Thanks for your feedback, Xabier. I have been diving a bit more into this and ended up in using the following format for now:

```
${bamboo.alphaVersion}-${bamboo.inject.jiraIssueNumber}${bamboo.buildNumber}
```

I have indeed used the "Inject Variables from file", with a script to extract the JIRA issue number from the branch name, as described in my related question [here](https://answers.atlassian.com/questions/11974304/how-to-transform-bamboo-variables).

The other annoying part of this, is that Bamboo generates its own release number following a non-customizable format. But at least the whole chain works now.


author: Xabier Davila
body: I have been fighting with similar issues for a while, my solution so far is to add the branch name to the version:

*\<PRODUCT_NAME\>-X.Y.X_\<BRANCH\>+buildBBBB*

That is

*product-1.2.3_FEAT-456_build0876*

Not sure this will end up fitting in 20 chars anyway.

Other possible option would be, in the first job of your build, trim the revision number, save it to a file,[and inject the variables](https://confluence.atlassian.com/display/BAMBOO/Configuring+a+variables+task), defining the scope as the full plan. A bit cumbersome, I know
Can Bamboo require a code review with Gatekeeper strategy?
Asked by Richard Cross:

When using the Gatekeeper strategy, a merge to master is performed if the build is clean. Is there any way to mandate a code review at this point, before going ahead with the merge (i.e. as an additional criteria)?


Answers:
author: Krystian Brazulewicz
body: We do not provide such feature.

However we also sometimes use the workflow as you described. What we do then is:

* create integration branch (we know it will live for a considerable period of time - few weeks) for a given epic/feature and set up Gatekeeper for Bamboo plan branch for this branch
* create development branches for every story we develop
* every time the story is about to be completed we use Atlassian Stash or Crucible to create pull request or code review
* after development branch build is green and code review is completed we merge development branch to epic/feature integration branch
* after epic/feature integration branch build is green it is being merged into higher-level branch


Tags: bamboo-administration
Trying to delete a specific pod name using cmd line brings this error
Asked by yosser_mahfoudh:

- pipe: atlassian/kubectl-run:3.2.0  
variables:  
KUBE_CONFIG: $KUBE_CONFIG  
KUBECTL_COMMAND: "get pods -n default --no-headers=true \| grep \^core-srv \| awk '{print $1}' \|head -n2 \|tail -n1 \|xargs kubectl delete pod"

the output is this

Please I need help![Capture.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/195160i9C6F16C9BA127632/image-size/large?v=v2&px=999 "Capture.PNG")


Answers:
author: o_kyrdan
body: Hi [@yosser_mahfoudh](/t5/user/viewprofilepage/user-id/3803216)

Thank you for your question!

Current pipe's [command implementation](https://bitbucket.org/atlassian/kubectl-run/src/f696cf51025e2cb7fefec77ab402cf7049d9ef67/pipe/pipe.py#lines-130) based on Python subprocess module.

So, this complex command with "shell pipe" is not supported.

If you need some feature implementation you could create your own [custom pipe according to the guide](https://bitbucket.org/blog/build-flexible-ci-cd-pipelines-with-custom-pipes).

Best regards,  
Oleksandr Kyrdan


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

kubernetes
The requested repository either does not exist or you do not have access.
Asked by Rafael de Mesquita Moura:

Hi folks. I don't know if someone had this problem before, but I'm facing some weird situation with workspaces.

I have a Bitbucket Cloud workspace to manage my sources and the company who I work for also has one.

I have different ssh keys registered on my profile (one registered at company account and one registered at private account).

Both keys are in my \~./ssh directory:

```
$ ls -la ~/.ssh
keyOne
keyOne.pub
keyTwo
keyTwo.pub
```

When I try to fetch my repositories I receive the error below:

```
Fetching origin
The requested repository either does not exist or you do not have access. If you believe this repository exists and you have access, make sure you're authenticated.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
error: Could not fetch origin
```

And I've notice that just when I rename one of my keys to id_rsa and id_rsa.pub, the git commands works fine.

Some links I've visit, trying to solve this situation:

<https://stackoverflow.com/questions/25927914/git-error-please-make-sure-you-have-the-correct-access-rights-and-the-reposito>

<https://careerkarma.com/blog/git-please-make-sure-you-have-the-correct-access-rights/>

<https://github.com/jakubroztocil/cloudtunes/issues/23>

I've followed articles and websites, but nothing resolved this problem. The question is, did someone else face this problem before?


Answers:
author: Theodora Boudale
body: Hi Rafael and welcome to the community!

If you use two SSH key pairs and each of them is added to a different Bitbucket account, you will need to do some extra configuration so that each of your local repositories uses the correct SSH key pair.

The following blog post has step by step instructions on how to achieve that:

* <https://blog.developer.atlassian.com/different-ssh-keys-multiple-bitbucket-accounts/>

If you have any questions, please feel free to let me know.

Kind regards,  
Theodora


Tags: atl-gruland

bitbucket-cloud

cloud
AWS-Cloudformation-deploy pipe should be able to export stack outputs after completion
Asked by sorah:

AWS-Cloudformation-deploy pipe should be able to make all stack outputs accessible after completion - so even if there are outputs without exports in the cloudformation templates that are required as inputs for other purposes / other pipes, then we should simply be able to put all outputs into a variable that can be used in later steps in the pipeline.

Is there anything I am missing how this could be achieved?


Answers:
author: o_kyrdan
body: Hi [@sorah](/t5/user/viewprofilepage/user-id/2263016)

Good suggestion!

It's a good case to create a new suggestion request with a type *Suggestion* and *Component: Pipelines - Pipes in the [list of existing tickets](https://jira.atlassian.com/browse/BCLOUD-13452?filter=97052) .*

So, you and other users could vote for it.

Best regards,  
Oleksandr Kyrdan


Tags: aws

bitbucket-cloud

bitbucket-pipelines

cloud

cloudformation
Error when cloning with permission denied
Asked by Tolibin:

i get the error when i clone my repository in bitbucket

git@bitbucket.org's password:  
Permission denied, please try again.  
git@bitbucket.org's password:  
Permission denied, please try again.  
git@bitbucket.org's password:  
git@bitbucket.org: Permission denied (publickey,password).  
fatal: Could not read from remote repository.

Please make sure you have the correct access rights  
and the repository exists.  

i follow this tutorial <https://support.atlassian.com/bitbucket-cloud/docs/set-up-an-ssh-key/> and <https://support.atlassian.com/bitbucket-cloud/docs/troubleshoot-ssh-issues/> but nothing work   

how i can clone my repository with no password ?


Answers:
author: Patrik S
body: Hello [@Tolibin](/t5/user/viewprofilepage/user-id/4900616) ,

Welcome to Atlassian Community.

When using ssh to clone the repository you usually wouldn't be asked to provide a password, unless you have configured a passphrase when you created your ssh key pair.

In order to better understand the issue I would like to check the following :

* What is the operating system you are using (Linux, MacOS, Windows) ?
* Are you cloning directly from the terminal or using another application, such as Sourcetree or Git Bash?
* Could you please clone your repository with the command below and share us the full output ?

  ```
  GIT_TRACE_PACKET=1 GIT_TRACE=1 GIT_SSH_COMMAND="ssh -vvv" git clone git@bitbucket.org:<workspace>/<repository>.git
  ```

  This will add verbose logging to the git command and help us on the investigation.

Hope to hear from you soon!

Thank you, [@Tolibin](/t5/user/viewprofilepage/user-id/4900616) .

Kind regards,

Patrik S.


Tags: bitbucket-cloud

cloud
I'm not receiving verification emails from Atlassian
Asked by Woody:

Hi,

I've tried to set up a new account for BitBucket for my work and apparently have had the verification email sent, the email address is correct however I'm not receiving any verification emails?

I've tried re-sending the email a number of times and haven't received any of them.

Can you please help me?

Thanks in advance!


Answers:
author: Caroline R
body: Hi, [@Seong Hyeok Lee](/t5/user/viewprofilepage/user-id/4885928), welcome to the community!

I checked our logs and confirmed that your email domain had a block on the server that prevented emails from being sent to you. So I removed your domain from this suppression list.

Could you please confirm if you receive the email now?

Kind regards,   
Caroline


Tags: bitbucket-cloud

cloud