youngmon/atlassian-qna huggingface dataset:
Bamboo Specs - howto inject variables?
Asked by Jan Nylund:

Using bamboo-specs.yml, I can't seem to find a way to inject variables to the result scope (similar to the task inject bamboo variables).

Is this feature currently missing?


Answers:
author: Gonchik Tsymzhitov
body: Hi!

Let's see this one <https://docs.atlassian.com/bamboo-specs-docs/6.3.0/specs-yaml.html#java>

I suggest to use Bamboo java specs <https://confluence.atlassian.com/bamboo/tutorial-create-a-simple-plan-with-bamboo-java-specs-894743911.html>

It is more flexible.

Cheers,

Gonchik Tsymzhitov

comments: author: Jan Nylund
body: Yeah, I noticed, seems the yaml support is on a proof of concept level :/


author: Jeyanthan I
body: Hi Jan,

There is an open feature request for this and we encourage you to upvote and comment on it: [BAM-19858](https://jira.atlassian.com/browse/BAM-19858) .


author: Jan Nylund
body: Thanks, I upvoted it. Sorry to see, but it feels like Bamboo is considered a second level citizen these days.


author: Jeyanthan I
body: It is just a matter of time, Jan. Bamboo is introducing so many new features in every major release. I'm confident the feature gets significantly better over the upcoming releases. Thanks for understanding.


author: Jan Nylund
body: [@Jeyanthan I](/t5/user/viewprofilepage/user-id/1124775) Thanks for the comment, but I have to say I disagree. Looking at the release logs, a lot of things are mentioned but very few that actually make a difference.

<https://confluence.atlassian.com/bamboo/bamboo-releases-671089224.html>

I've been running Bamboo since early 5.x and so far there are only two things that really has simplified life after that; the docker runner (which I used before wrapped in an own shell script), and the support for start building features on PR creation. Most of the other things are minor / bugfix / not-that-important.

If you compare this ti CircleCi, Travis, Bitbucket Pipelines, etc, the drive for Yaml as configuration has been going a lot forward. In Bamboo, the yaml support hasn't really changed after initial release, which makes it rather useless for now.


Tags: spec

yaml
Howto configure volumes for Docker runner via bamboo-specs.yml
Asked by Jan Nylund:

Testing out bamboo-specs, one of the first things I typically do in a build is to run it in a docker context. This works fine with the \`dockerImage\` configuration, but to cache things I typically add a volume mapping to the docker configuration.

I can't find any way of doing this in Bamboo Yaml specs?

(the same goes for running git within docker, thanks to how Bamboo caches git repos, this requires an extra volume mapping to work within a docker container).

Am I missing something? Or is there another solution to caching? (like in bitbucket-pipelines for example)


Answers:
author: Jan Nylund
body: Ok, so I found the answer, this is simply not implemented yet.

References:

- <https://jira.atlassian.com/browse/BAM-19952>

- <https://community.atlassian.com/t5/Bamboo-questions/Configuring-Docker-agent-in-YAML-Bamboo-specs/qaq-p/824462>


Tags: cache

docker

spec

volume

yaml
Can SONAR4BAMBOO work for iOS projects?
Asked by Aya Akl:

Hi!

I am trying to use SonarScanner on bamboo for iOS project but it keeps telling me this error:

```
SONAR4BAMBOO: was not able to find a SonarQube result URL
```

Can SONAR4BAMBOO work for iOS projects? because I am totally stuck here.

Thanks a lot!


Answers:
author: Gonchik Tsymzhitov
body: Hi!

Have you tried to ask directly <https://mibexsoftware.atlassian.net/servicedesk/customer/portal/1> ?

I hope app vendor will fix it.

Cheers,

Gonchik Tsymzhitov
Is is possible to use a global variable into an instance startup script
Asked by Neculai Amarghioalei:

I would like to know if possible to set a global variable as a password.

Use that global variable into an remote agent instance configuration script to set a secret env variable.


Answers:
author: Daniel Santos
body: Hi Neculai,

Global variables are not accessible from the startup script text field. I'm afraid you won't be able to save/use credentials that way.

It seems you need those credentials before the agent comes up, otherwise you could just use a plan variable for that, calling it during build time on a script task.

You can create/update environment variables during the startup script, as described in [Instance startup script samples - Atlassian Documentation](https://confluence.atlassian.com/bamkb/instance-startup-script-samples-951416739.html) (Appending the path variable), but then you will need to use only the content added in the startup script text field or any external call (REST, SSH, etc) to get the information you want and load it in your variable.


Tags: remote-agent
JUNIT PARSER IN bMABOO-NEED the pass count to be displayed in bamboo
Asked by CrazyAs5assin:

Hi Team,

I wrote a java code which will generate a xml as attached . If i use a junit parser task in bamboo it displays the failure as below. I need to display the testcase which is passed as well.

XML file-![Capture.JPG](/t5/image/serverpage/image-id/31025iF12DF6404FB1D4F4/image-size/large?v=v2&px=999 "Capture.JPG")

result displayed in bamboo:

![pic.png](/t5/image/serverpage/image-id/31026i53909455938DF2FF/image-size/large?v=v2&px=999 "pic.png")


Answers:
author: Foong
body: The pass test details are shown in the Job level, example: http://localhost:8085/browse/BAM-GIT-JOB1-52/test
Unable to add new repositories
Asked by Zweistein2:

Heyho,  

I'm unable to add new repositories, whether they are linked or plan ones. On top of that, I'm unable to edit existing ones. When clicking the save button, the wheel just keeps spinning and the repository won't be saved. The logs show zero errors, but some REST-requests containing the name of the new repository.

When I trigger a build, the existing repositories get checked out with no problems. In the configuration menu it shows the existing branches and repositories, so it's not a problem with the connection to the bitbucket server  

Any suggestions?


Answers:
author: Foong
body: Is there any proxy server in front of Bamboo? If yes, check if proxy setting is added to Bamboo server.xml like the following example:

    <Connector port="8085"      protocol="HTTP/1.1"     connectionTimeout="20000"     useBodyEncodingForURI="true"     redirectPort="443"     compression="on"     compressableMimeType="text/html,text/xml,text/plain,text/css,application/json,application/javascript,application/x-javascript"     secure="true"     scheme="https"     proxyName="mycompany.com"      proxyPort="443" />

Does the problem happen if Bamboo is accessed without proxy server, example: http://localhost:8085

[Securing Bamboo with Apache using SSL](https://confluence.atlassian.com/bamboo/securing-bamboo-with-apache-using-ssl-391087437.html)
> The logs show zero errors, but some REST-requests containing the name of the new repository.

Does it have the following example log when creating Linked repository?

```
2018-09-07 22:44:20,740 INFO [http-nio-8085-exec-21] [AccessLogFilter] kahloun.foong POST http://localhost:8085/admin/createLinkedRepository.action 483123kb
```


Tags: bug

repository
Bamboo build queue timeout
Asked by Jozsef Kercso:

I'm trying to set the timeout values for a given Bamboo plan like this:

- I open the "Default Job" of my "Default Stage" and set the following values on the **Miscellaneous** tab: *Build Time Multiplier* = 1, *Log Quiet Time* = 1, *Build Queue Timeout* = 1. My average build time is 17 seconds.

I would expect that the build is aborted after 1 minute if it waits more than 1 minute in the queue or if there is no log output for more than 1 minute.

I start the build. Unfortunately after 6 minutes it is still in the queue and Bamboo displays the following message on the plan's summary page:

Build: #11 has been queued for 6 minutes ... {#toc-hId-1823748104}
------------------------------------------------------------------

On the same summary page I see the following message as well:

HPC Information {#toc-hId--728408857}
-------------------------------------

### PROJ-TEAM-JOB1-11 {#toc-hId-817887973}

|-------|----------------------------------------------------------------------------------------------|
| Info: | License limitation is currently reached. No additional agent can be requested at the moment. |

I suspect that this is the reason of waiting in the queue, but I would expect that the build is still stopped after one minute due to the *Build Queue Timeout*setting.

Could somebody help me to solve this issue?

Thanks,

Jozsef


Answers:
author: Foong
body: > I start the build. Unfortunately after 6 minutes it is still in the queue and Bamboo displays the following message on the plan's summary page:

*Build Queue Timeout* is used together with *Job Queue Timeout* notification to send notification to user instead of stopping the build.
Getting an error during build in bamboo
Asked by Dhiraj_Kumar_Mishra:

While I am trying to run a vs build in bamboo I am getting error saying Findstr not recognised as internal or external command.  
I have added the C:windows/system32 to system env variable.Also I restarted the agent with admin credentials,still I am getting the error.What should I do.


Answers:
author: Edwin Kyalangalilwa
body: Hi [@Dhiraj_Kumar_Mishra](/t5/user/viewprofilepage/user-id/1677728),

Please post the errors from the logs and also a sample of your Bamboo configuration.
Bamboo 6.1.4 regex on repository Branch Detection Path
Asked by Steve Zook:

I want to have a single plan with a repository path of \<SVN path\> and "Branch Path" of "Trunk". I wish it to automatically create a new branch when a new folder shows up in SVN in any of

\<SVN path\>/Branches/?

\<SVN path\>/Tags/?

This post "<https://community.atlassian.com/t5/Bamboo-questions/Bamboo-build-branches-from-releases-and-branches-folders/qaq-p/144482>" seems to imply that the "Branch Detection Path" on either the Repositories or Branches tab should accept regex.

If it did, "Branches\|Tags", or better yet "\[bB\]ranches\|\[tT\]ags" should match the desired folders. However, it appears that this is not true in 6.1.4. Is there a later version in which regex is accepted?

Currently I must create two plans (one for Trunk and Branches, one for Trunk and Tags) to get full coverage. Note that "Branches" and "Tags" each work properly (although neither "branches" or "tags" do). Of course, this doubles the number of plans and worse causes Trunk commits to be built twice.


Answers:
author: Foong
body: That post is not related to "Branch Detection Path" and it does not work due to <https://jira.atlassian.com/browse/BAM-15739>
Bamboo - stop deployment status
Asked by timofey_shklyarov:

Hi,

When a user stops deployment in progress, deployment gets status: Failed. We are gathering deployments stats and these aborted deployments create confusion and make stats not valid. Can a new status be implemented, e.g.: Canceled (or Aborted) ?

We are using Bamboo 6.3.0 build 60304 - 20 Dec 17. Maybe it is already implemented in current versions (don't see it in release notes) ?

Can't create a BAM ticket (not available in Projects drop down) , created a tst ticket <https://jira.atlassian.com/browse/TST-87257>, which I can't view oO (It may have been deleted or you don't have permission to view it.) .

Thanks!


Answers:
author: Foong
body: Have moved the issue to <https://jira.atlassian.com/browse/BAM-20084>


Tags: deployment
How to customize filelds of jira issues in bamboo rest api
Asked by Karol:

Hello,

I need get list of issues that are related to build in bamboo. I've menaged that by using bamboo rest api:

[http://myhost.com:8085/rest/api/latest/result/{projectKey}-{buildKey}-{buildNumber : (\[0-9\]+)\|(latest)}](https://docs.atlassian.com/atlassian-bamboo/REST/6.6.2/?_ga=2.40097063.465302588.1535618415-814301138.1511770623#d2e4491) \[[GET](https://docs.atlassian.com/atlassian-bamboo/REST/6.6.2/?_ga=2.40097063.465302588.1535618415-814301138.1511770623#d2e4501)\]

It works fine, but I get only a few fields of jira issue. Is there a way to customize which fields of issues would be returned ?


Answers:
author: Foong
body: > I need get list of issues that are related to build in bamboo.

Jira issues from a single build result or the whole build plan?
> but I get only a few fields of jira issue.

Do you mean it does not have the complete results of Jira issues in that single build plan? How many Jira issues is returned?
> Is there a way to customize which fields of issues would be returned ?

Do you mean you would like to have Jira issues from a specific Jira project only for a single build result?


Tags: atl-adm

developer

jira
Examples needed for bamboo yaml specs
Asked by anusha:

i am trying to use bamboo yaml specs to create a plan, checkout a code and build it, but i don't seem to find any example other than the dragon slayer example ! can someone help me and point me in right direction ?


Answers:
author: Gabriel Ribeiro
body: Hi Anusha,

Is there any specific thing you want to do?

Please note that all current YAML Specs library available is covered by the [reference documentation](https://docs.atlassian.com/bamboo-specs-docs/6.6.2/specs-yaml.html) and if you're not finding examples of what you're trying to do there, it's possible that you'll not be able to use YAML specs to create your plan.

Is it possible to share with us details of your plan? What building tool are using?

thanks.

comments: author: kitsushadow
body: Maybe some actual yaml example code in the Reference Docs would be great.   

I'm reviewing the reference docs right now and I need to do a simple checkout.

* Add `CheckoutItem` objects. You will specify the repository and the path where it will be checked out. You can add multiple `CheckoutItem`.
* Decide if task should perform a clean checkout. If set, the task will remove contents of each specified folder before checking out the source code.

That's straight out of the Reference Documentation. There is no example of where or how CheckoutItem should be used and how the options for it like clean checkout should be applied. Incredibly poor documentation.   

Unfortunately my team doesn't have Java experience, besides myself so just switching to Java spec isn't an option.


author: Foong
body: YAML have checkout task by default without any configuration. <https://docs.atlassian.com/bamboo-specs-docs/6.9.2/specs.html?yaml#task-repository-checkout>

Feature request <https://jira.atlassian.com/browse/BAM-20529> to configure more options to the checkout task


author: anusha
body: Thank you for the response, given the limitations, i switched to java specs to build the pipeline.
Disable Bamboo Specs
Asked by stephen_leavitt:

How can I disable Bamboo Specs on a build or deployment plan so that I can make changes to it via the Bamboo UI instead? I cannot seem to convince Bamboo 6.6.1 to disable it even though I've removed the linked repositories I'm using for this purpose, and disabled Bamboo Specs scanning from Admin -\> Security -\> Security Settings -\> Enable Repository Stored specs, and I still cannot convince Bamboo to let me edit the plan in the Bamboo web UI.


Answers:
author: stephen_leavitt
body: Well, I came up with a way that works, since I was not willing to lose build history on this build plan. I also think it's a crappy solution, as it required accessing the database directly.

Here's what I finally got to work (after removing the linked repositories that had Bamboo Specs scanning enabled and turning off Repository Stored specs):

```
UPDATE build
SET vcs_specs_source_id=NULL
WHERE?build_type='CHAIN' AND full_key='<full_build_plan_key>';
```

Also, it appeared that Bamboo had to be restarted to get it to re-read that change. But once it came back up, the build plan could once again be managed by the Bamboo web UI.

Atlassian, please do something to address this. I believe that someone with administrative privileges in Bamboo should be able to do this without having to manually issue SQL queries to effectively turn off Bamboo Specs on plans that already have them enabled.

comments: author: Jeyanthan I
body: Hi Stephen,

I understand this is frustrating for you. I found that there is already an existing feature request for what you are looking for -   
[BAM-19616 - Ability to transition a plan from Repository Stored Specs (RSS) managed back to a standard plan](https://jira.atlassian.com/browse/BAM-19616)

Please share your views there in a comment and don't forget to upvote.

Cheers,  
Jey
Artifact handler question
Asked by Terry Lim:

I have a remote agent that I want to generate 2 artifacts. One, A, is very large that I want to store on the remote agent. The second, B, is small and is needed by a local agent on the bamboo server as input to another build. So, if I enable the Agent-local artifact handler for the plan, A and B will stay on the remote agent, but will the server be able to get B since another plan has it as a depedency?

If not, is there another way to do this? (Artifacts A and B need to be generated from the same version in the repository)

Thanks!


Answers:
author: Gabriel Ribeiro
body: Hi Terry,

If you store the artifacts only on the remote agent, it will be available only for plans running on this agent.

Is artifact **A** also shared? What you can try is to keep non-shared artifacts on agent's environment and move only the shared ones to the server or to an S3 Bucket.

The following documentation exemplifies some use-case scenarios that I'm sure will help you to understand how this feature works:

* [Bamboo Artifact Handlers - Use Case Scenarios](https://confluence.atlassian.com/bamkb/bamboo-artifact-handlers-use-case-scenarios-939695899.html)

Let us know if you have any other question.

thanks

comments: author: Terry Lim
body: Thanks for your reply.

A is also shared so it can be used by a deployment. I looked at the link previously, but I found it confusing. It didn't seem my use-case was covered. What I did to work around this was to create an intermediate plan that runs on the remote agent that has remote and agent-local enabled. The plan simply downloads B and then publishes it as a new artifact. I think the root issue is that you cannot control how each individual artifact it managed, its all or nothing.
Is Bamboo vulnerable to CVE-2018-11776 (Apache Struts)
Asked by Richard Cross:

Bamboo appears to use a custom version of the struts2-core-2.5.13 jar. Is Bamboo therefore vulnerable to the above CVE?

Additionally, on what timescale can we expect a new release of Bamboo that uses the latest fixed version of Struts (2.5.17)?


Answers:
author: Alexey Chystoprudov
body: Bamboo is not vulnerable.

Struts 2.5.17 will be part of Bamboo 6.7 release planned for second half of September 2018


author: Alexis Robert
body: Hi [@Richard Cross](/t5/user/viewprofilepage/user-id/664850),

in another post, Atlassian replied the following:

> ----
>
> Thank you for reaching out to Atlassian Community!
>
> We understand your concern regarding the new *CVE-2018-11776* vulnerability [announced](https://cwiki.apache.org/confluence/display/WW/S2-057) On August 22, by the Apache Software Foundation
>
> Our security team has investigated the case and we confirm that no Atlassian products are affected by this vulnerability, including Crowd 3.2 and all other Crowd versions that did not reach [EOL](https://confluence.atlassian.com/support/atlassian-support-end-of-life-policy-201851003.html).
>
> However, as an extra precaution that is in-line with industry best practices we will be releasing new versions of [Crowd 3.2.x and 3.1.x](https://www.atlassian.com/trust/security/bug-fix-policy) with updated version of Struts.

Let me know if this helps,

--Alexis
JIRA Bamboo Integration
Asked by Prasad Andrews:

Hi All,

Please suggest me, how to achieve the below requirement.

1) In JIRA issue create/update page:

* If the 'Affects Application(s) / Vendor(s)Required' field is selected as 'ESPN' then a new custom fields 'Release Components' and 'Release version' should be displayed in below format.

|-------------------|------------------|------------------------|
| Field name - text | Field name- text | Field value - dropdown |
| Component 1       | Release version  | No relese,r1,r2,r3..   |
| Component 2       | Release version  | No relese,r1,r2,r3..   |
| Component n       | Release version  | No relese,r1,r2,r3..   |

Note: Field name -- 'Components n' -- These fields are static to the ESPN application.

The field name 'Release version' should be populated based on the available release version for the selected component, environment and BU region in JIRA.

* Once the user creates/update issue, a post function should be triggered to capture the following fields and store it in a JIRA variable -- the field is -- Environment, Business Unit, affected applications, Component\[1,2, n\], release version.

2)In JIRA workflow:

In the SW Release (IT Operations) or in Deployment JIRA workflow, when the issue is in 'To Deployment' status if the RM clicked that button then the 'In progress' transition should trigger the post function which will trigger the customized bamboo deployment plan. If the Bamboo deployment result is a success, then the issue should be transitioned to next state 'Deployment Completed'. If the bamboo deployment is a failure, then the issue should be transitioned back to 'To Deployment'.

The custom Bamboo deployment plan URL is framed using the custom issue field recorded in JIRA variables![WF.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/30763iFADE2D26C107D3D0/image-size/large?v=v2&px=999 "WF.PNG")


Answers:
author: Gonchik Tsymzhitov
body: Hi!

What about the webhook ?

Also, you can automate it

<https://github.com/atlassian-api/atlassian-python-api>

Cheers,

Gonchik Tsymzhitov


Tags: jira

jira-server

server
JIRA Bamboo Integration
Asked by Prasad Andrews:

1) In JIRA issue create/update page:

* If the 'Affects Application(s) / Vendor(s)Required' field is selected as 'ESPN' then a new custom fields 'Release Components' and 'Release version' should be displayed in below format.

|-------------------|------------------|------------------------|
| Field name - text | Field name- text | Field value - dropdown |
| Component 1       | Release version  | No relese,r1,r2,r3..   |
| Component 2       | Release version  | No relese,r1,r2,r3..   |
| Component n       | Release version  | No relese,r1,r2,r3..   |

Note: Field name -- 'Components n' -- These fields are static to the ESPN application.

The field name 'Release version' should be populated based on the available release version for the selected component, environment and BU region in JIRA.

* Once the user creates/update issue, a post function should be triggered to capture the following fields and store it in a JIRA variable -- the field is -- Environment, Business Unit, affected applications, Component\[1,2, n\], release version.

2)In JIRA workflow:

In the SW Release (IT Operations) or in Deployment JIRA workflow, when the issue is in 'To Deployment' status if the RM clicked that button then the 'In progress' transition should trigger the post function which will trigger the customized bamboo deployment plan. If the Bamboo deployment result is a success, then the issue should be transitioned to next state 'Deployment Completed'. If the bamboo deployment is a failure, then the issue should be transitioned back to 'To Deployment'.

The custom Bamboo deployment plan URL is framed using the custom issue field recorded in JIRA variables.

![WF.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/30762i0849C3EA66008887/image-size/large?v=v2&px=999 "WF.PNG")


Answers:
author: Prasad Andrews
body: Any updates on the requirement?


Tags: jira

jira-server

server