youngmon/atlassian-qna huggingface dataset:
How to set docker image value from a plan variable
Asked by GregD:

I'm trying to set the value for the Docker Image value in the Isolate Build settings of a Bamboo plan that is using the Docker Runner. To be clear, these are the settings to run a job in a container, not to perform steps to create docker images. So the Docker Image value on the Bamboo plan configuration webpage is just a text box. When I create a plan variable like "bamboo_dockerimage" equal to a valid image location, and then enter "${bamboo.dockerimage}" in the text box (without the quotes), the variable is not substituted when the job executes. I can see the the raw unsubstituted variable name in the Docker command output when the job finishes in error log, instead of substituted value. I'm using Bamboo 6.4.0. Anyway to set the Docker image value to a variable? Ultimately I just want to override the image location from a key-value file in my source code. A new code revision might use a different image location.


Answers:
author: Marcin Gardias
body: Hmm, it seems to me that your variable's name does not match. If your plan variable (as shown in the variable UI) is named bamboo_dockerimage then the usage woudl be ${bamboo.bamboo_dockerimage}, that doesn't seem like sth. you intended.

Please rename your variable to *dockerimage,* then it will be referenced as ${bamboo.dockerimage} and exported as shell variable *bamboo_dockerimage.*

comments: author: Marcin Gardias
body: Also, let me remind you that Bamboo version 6.4.0 is no longer supported. I strongly recommend an update to something newer.


author: GregD
body: You nailed it with the variable name!


Tags: docker
Dynamic Loading of Data in Task Configuration using Callback
Asked by Tanmoy Guha:

We are creating a Bamboo plugin, and while configuring the plugin we need to load data dynamically from different server based on the selected values. So I am looking out for ways to handle this scenario and I could not find any solution for the same. Can anyone provide a solution for this or refer to any relevant resources.

We have created a tasktype mapping in atlassian-plugin.xml, and using TaskConfigurator to configure the plugin, also provided edit and view resources in ftl files.

Configuration:

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/114580i8C994CC75037E6D3/image-size/large?v=v2&px=999 "image.png")

Thanks,


Answers:
author: Alexey Chystoprudov
body: To achieve such task you need to use some JS code at your FTL templates to fetch data from REST endpoint your plugin provides or fetch it directly from 3party service.

For reference of such functionality look at source code of Bitbucket Server plugin (bamboo-stash-plugin) or Bitbucket Cloud (bamboo-bitbucket-plugin) or <https://bitbucket.org/atlassianlabs/bamboo-after-deployment-trigger/src/master/>
Execute Plan by code commit but maximal every 2 hours
Asked by Werner Gerritsen:

Hi

I would like to know if there is a possibility to trigger a plan based on commits, but not more the every 2 hours. The first commit triggers directly the plan. all further commitsinside the next 2 hours will result in one trigger of the plan after that time period.

Optional: after first commit waits on further commits inside 1 hour and then triggers the plan

Or can I do this somehow else?

Best Regards

Werner


Answers:
author: Marcin Gardias
body: Repository polling trigger with polling period set to 2 hours should pretty much do it.

comments: author: Werner Gerritsen
body: Thanks for responce. I will check this. Didn't thought about that.


Tags: trigger
Execute Plan at least every week once
Asked by Werner Gerritsen:

Hi

I need to check dependency on my code at least every week. So I search fo a possibility to have a plan with the following triggers:

* By commit into git
* At least once per week (but only if no commits)

Are there any possibility to have such trigger combination or how could I do a similar situation?

Best Regards

Werner


Answers:
author: Gerhard Forster
body: Hello Werner,

Thanks for asking out things in Bamboo's Community space - great to have you with us.

Now first thing with regards to your question, you can define as many triggers as you want per build plan. So maximium should then be all existing ones, which rarely you would do.

However, in your case you should set Bamboo's commit trigger and depending on what what repository type you use that can be "Bitbucket Server repository triggered" or "Remote trigger". Note that for the latter, you'll still need to set up a WebHook so that e.g. Bitbucket Cloud can notify Bamboo about any Git change that happened there.

And as a second trigger, for your use-case, you could use "Scheduled" and configure this trigger type for that wished day in the week that the build schould run and when exactly that shall be.

Finally find here our "Triggering builds" KB <https://confluence.atlassian.com/bamboo/triggering-builds-289276897.html> which will guide you well on this configuration journey and that provided useful extra information.

Thanks and all the best,

Gerhard

comments: author: Werner Gerritsen
body: Hi Gerhard

Thanks for the reply

So that means there is no possibility to trigger a build only if no trigger was give by a commit since a week.

Best Regards

Werner


Tags: trigger
Bamboo API call to add CRON trigger to a build plan.
Asked by Kaushal I:

Hello,   

Is there a Bamboo API call that i can use to set the CRON expression for the trigger.   

we have a use case where we want to set CRON expressions to build plans so they run on the schedule specified in the CRON expression.

I quickly checked the API doc but didn't see anything for setting the trigger details.

<br />

Thanks,

Kaushal.


Answers:
author: Alexey Chystoprudov
body: There's no REST API to change plan configuration. But there's Bamboo API which can be used to change plan settings. So it would required to create new plugin which can receive Plan key and Cron string by REST and it will modify settings of plan


Tags: build

trigger
CI/CD capability and Searching tests capability comparision between Zephyr and Xray
Asked by Dipak Patadia:

Comparison between Zephyr and Xray with regards to DevOps capabilities.

I need to know if Zephyr has this capability of having better **CI/CD capability and Searching.** Need your suggestions to decide if we go for Xray Or Zephyr.

* Both do almost similar kind of work with some advantages and disadvantages of them with respect to cost, automation, reporting, etc.

<!-- -->

* With regards to Automation Testing: As enterprises become bigger with tons of features, automated testing becomes essential. If you need to execute a hundred even thousands test for your weekly releases, an automation script integration could help a lot, and Xray has a native cucumber automation build in. Which means testing can take hours instead of days (nor weeks) with no need for another add-on. Xray also has Pre-conditions worth noting since it allows for specific criteria to be added into testing(e.g: a user has to be the member that has X tier).

Zephyr does not do automated testing as an add-in like Xray and you might need a way around such as "ZBot" for Zephyr (this is an additional add-on which you must purchase.) and this might be challenging for a new member who is not used to the tools.

* **Looking at feature level comparison, it looks Xray has upper hand considering automation and CI/CD capability and Searching tests capability**.

What are your opinion?

Regards,

Dipak


Answers:
author: Sergio Freire - Xblend
body: Hi [@Dipak Patadia](/t5/user/viewprofilepage/user-id/4123413) ,

just to clarify that Xray[supports many more automation frameworks](https://docs.getxray.app/display/XRAY/Integrating+with+Testing+Frameworks) besides Cucumber, including Robot frameworks, JUnit, xUnit, TestNG, NUnit, etc.

You can find [dozens of automation tutorials](https://docs.getxray.app/display/XRAY/TTT%3A+Automation) covering these frameworks and additional automation tools (e.g. Postman, NeoLoad, JMeter, etc) in the documentation.

So, no matter the automation framework/tool you chose, you can easily integrate with Xray from the pipeline. Talking about CI/CD, you can use Jenkins, TeamCity, Bamboo using native and free plugins for it. You can also use Gitlab, AzureDevOps and other! Your team decides :)

Regards

S?rgio
First installation, unable to read cipher for 0
Asked by Asief Hussain:

This is my first time installation of Bamboo, on windows 10 machine

When i start the service, i get access denied error to cipher key. To resolve this i corrected security rights/permission to cipher.key_0

Now when i start the service again. It shows me this error.
> 2020-10-10 00:32:32,733 FATAL \[localhost-startStop-1\] \[InstanceSecretStorage\] Database part of instance key is unavailable  
> 2020-10-10 00:32:32,733 FATAL \[localhost-startStop-1\] \[InstanceSecretStorage\] Cipher initialisation vector is unavailable  
> 2020-10-10 00:32:32,733 FATAL \[localhost-startStop-1\] \[BambooContainer\] Cannot start Bamboo  
> java.lang.IllegalArgumentException: Unable to read cipher data for 0

As mentioned in some other posts on how to resolve this error, i followed those steps. The same error as before appears.


Answers:
author: Gonchik Tsymzhitov
body: Hi [@Asief Hussain](/t5/user/viewprofilepage/user-id/4119947) ,

Please, use the next docs

<https://confluence.atlassian.com/bamkb/bamboo-recovery-after-encryption-key-loss-976758197.html>

<https://confluence.atlassian.com/bamkb/unknown-cipher-data-id-0-when-performing-certain-actions-in-bamboo-on-windows-after-switching-bamboo-to-run-as-a-service-923437107.html>
What permissions are needed to delete Deployment Environments?
Asked by James Brown:

I have a user with admin permission in the Bamboo Project, Bamboo Plan and Bamboo Deployment Project, yet they can not delete deployment environments.  
What permissions are needed?


Answers:
author: James Brown
body: This appears to be a know issue as reported in [https://jira.atlassian.com/browse/BAM-20357?error=login_required\&error_description=Login+required\&state=354c47cf-1040-4d5b-974b-e7a802e3fafc](https://jira.atlassian.com/browse/BAM-20357?error=login_required&error_description=Login+required&state=354c47cf-1040-4d5b-974b-e7a802e3fafc)  
If an agent is dedicated to the environment then users without Global admin privilages are unable to delete the environment.


author: Alexey Chystoprudov
body: You need to have Edit permission for Environment

comments: author: James Brown
body: The user has the following permissions  
Global - Create, Create repository  
Project permissions - View/Edit/Admin  
Plan Permissions - View/Edit/Build/Clone/Admin  
Deployment Project Permissions - View/Edit  
Environment - View/Edit  

They are still unable to delete environments or the deployment project


author: Alexey Chystoprudov
body: Please report issue to support.atlassian.com so support team can look at it


Tags: deployment

project
Failure in artifact preparation phase during processing of: Subscription for Non required shared art
Asked by sadhana:

Failure in artifact preparation phase during processing of: Subscription for Non required shared artifact: \[src\], pattern: \[\*\*/\*.\*\] anchored at: \[src\], destination: \[src\]

Agent:...


Answers:
author: yogesh_devi
body: Hello

I know its late response :-) - posting here so someone with similar error might benefit

In my Bamboo agent log I see following error

2021-01-15 13:42:07,532 ERROR \[2-BAM::sles12sp3-agent4::Agent:pool-5-thread-1\] \[BambooArtifactHttpTransport\]  
org.apache.http.TruncatedChunkException: Truncated chunk (expected size: 8,192; actual size: 4,202)

Do you see similar messages in your Bamboo agent log ?

If this is the case then it means there is an issue with Bamboo server to agent communication that is affecting transfer of artifacts

In that case you might want to use the workaround that I employed only if your default local agent can run the task that is dependent on shared artifacts being copied.

I changed requirements of the task dependent on artifacts to run locally on Bamboo default agent

Alternatively you might want to fix the cause for that exception by adjusting time outs - see - <https://stackoverflow.com/questions/45950805/org-apache-http-truncatedchunkexception/45952274>

By the way, did you see Dan turner's question <https://community.atlassian.com/t5/Bamboo-questions/Bamboo-build-failing-on-copy-of-shared-artifact/qaq-p/212050#U1581129> - That solution does not work for me though and I had to use above workaround

Best regards

Yogesh

comments: author: yogesh_devi
body: Couple things - now that Atlassian has discontinued the Server version and we have to migrate to Datacenter version - in The Bamboo Datacenter version "local" agents are no longer supported. - So that option goes out of the door :-(

I noticed that same error ( HTTP transport failure of artifact from Bamboo to agent ) may manifest as below as well

com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler  
2024-06-14 07:22:12,933 ERROR \[6-BAM::ubu22-build-30-24::Agent:Thread-22\] \[BambooArtifactHttpTransport\] Unexpected HTTP status code: HTTP/1.1 401  
2024-06-14 07:22:12,933 ERROR \[6-BAM::ubu22-build-30-24::Agent:Thread-22\] \[DisconnectedBuildLogger\] Unable to send to server: Artifact transfer failed with http code 401. Agent will try to recover.

And looking at that I landed up on following post

<https://community.atlassian.com/t5/Bamboo-questions/Bamboo-build-error-Unable-to-publish-artifact-from-bamboo-remote/qaq-p/848407>

and try increasing connection timeout in

\<installation-directory\>/conf/server.xml file

"**connectionTimeout=600000"**

Datacenter


author: sadhana
body: Any reply Please

comments: author: yogesh_devi
body: please see response below
Bamboo installation is stuck
Asked by Manisha Gurung:

I am trying to run my Bamboo in my AWS instance but its stuck. Tried making a completely new instance thrice still doesnt work. waited for the instance to load minimum 30mins each.

I made sure my jdk is 1.8 version, checked my path which seems right.

![bamboo-home.PNG](/t5/image/serverpage/image-id/113360i9415B81EBE930C79/image-size/large?v=v2&px=999 "bamboo-home.PNG")

![bamboo.PNG](/t5/image/serverpage/image-id/113359i0651CC3EBFD95671/image-size/large?v=v2&px=999 "bamboo.PNG")


Answers:
author: Charlie Misonne
body: What does the log file say?
Bamboo 4.4.5 not able to login after Jira migration
Asked by Christina C.:

We are migrating in a new Bamboo server , but there are still builds in use in the old one that are in use , and need to be moved . Recently we migrate our Jira server in a new server , and we can't now login in old Bamboo . The new Jira server is utilise a new Basic URL ( that's why the link broken ) . In BitBucket , and new Bamboo server , we just connected in recovery mode and changed the link to Jira user directory . But the 4.45 Bamboo doesn't have this option . We follow the instructions to reset the local admin ( ID=1 ) password , and then we got the message that "You are not a known user of this Bamboo server" , probably as its only use the Jira directory . ( The original error says You have entered an invalid username and password. Please try again , and you can see the unknown user if you try to reset the password .

We even start up the old Jira server , with the last db before the migration ( that also migrated in a new server ) . Using a host file in the old Bamboo server , we try the login again . Again the same issue : You are not a known user of this Bamboo server .

Seriously we still need the old Bamboo server for building and mostly - to correct export the builds to the new one .

How we can login to it , to change the User directory ?


Answers:
author: Joshua Sneed Contegix
body: Hi Christina,  
It sounds like you need to [Recover the admin account](https://confluence.atlassian.com/display/BAMBOO044/Restoring+passwords+to+recover+admin+users) and change the user directory configuration. Cheers!

comments: author: Christina C.
body: Hi Joshua , thanks for the fast reply . I have already done this . After i reset i was able to login the original admin account , but it says Access Denied ( Insufficient permissions ) , and nothing to be done , as Site Homepage just reloads this one . And : There are no administrators for this Bamboo installation.

Unfortunate its a really old installation , without any additional info from the previous admin .

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


author: Joshua Sneed Contegix
body: Hi Christina,

The lack of administrators in your Bamboo is a problem. You will likely need to add an existing user to the admin group through database edits. I do not know the SQL statements needed for this unfortunately. Cheers!


Tags: base-url

jira

user
How to disable notifications for spec branch builds while keeping the notifications from master?
Asked by kopper:

We are using com.atlassian.bamboo.specs.api.builders.plan.Plan to configure our Bamboo via Specs.

Our devs are creating branches to develop on before raising a Pull Request. Our builds are run at least twice: after the branch was pushed (and on subsequent changes) and after the PR was merged.

We'd like to notify Slack room when master is "red" but we don't care that much if a build for any of unmerged changes failed (beyond possibly notifying commiters).

We tried using PlanBranchManagement.notificationForCommitters but the docs say it is no-op for spec branches.


Answers:
author: Marcin Gardias
body: ```
`Something like this should do the trick:`


`Plan plan = new Plan(); // all the common code;    if (RssRuntimeContext.isDefaultRssBranch()) {`
`      plan.notifications(...);//any notifications you want on master branch    } else {      plan.notifications(...); //any notifications you want on specs branches    }`?
```

comments: author: kopper
body: Sweet, thanks mate!
Is it possible to obtain User ID from the token issued when a user logs in to Crowd
Asked by Daisuke Niwa:

Hello,

Is it possible to obtain User ID from the token which is issued (responsed from the Crowd server) when a user authenticates against Crowd server?

If it's possible, I would like to know how you can do that.

I appreciate your help.

Regards,

Daisuke Niwa


Answers:
author: joe
body: Yes; the 'session' resource contains that information when you successfully validate or retrieve the state of a token: [Crowd REST Resources: Crowd SSO Token Resource](https://developer.atlassian.com/display/CROWDDEV/Crowd+REST+Resources#CrowdRESTResources-CrowdSSOTokenResource).
How to save login session after browser window closed
Asked by Tim_Brigham:

I would like to configure my applications (Crucible \& Fisheye, Confluence, Jira, Bamboo all of which use Crowd with the SSO option) to persist their login information across having the browser window closed. Is this possible?

I have verified that cookies are not being auto deleted by the browser when the window is closed however the sessions aren't persisting. I'm not seeing a ready way to address this in the documentation. I have already increased the session timeout to one day which should be the frequency my users need to log in.

Each application is running on a dedicated box, mostly Linux based. The context for all applications (other than bamboo) is set to be the root.


Answers:
author: William Zanchet [Atlassian]
body: Hi Tim,  

Actually this problem is related with the context path. Basically it seems that all the requests are coming from one host. For example, <http://localhost:8085> -\> Confluence <http://localhost:8090> -\> JIRA <http://localhost:8095> -\> Bamboo.  

We have to create a context path, making Confluence be like this: <http://localhost:8085>/Confluence JIRA: <http://localhost:8090>/JIRA, that why Crowd will know which cookie to get.  

To create a context path for Confluence you should check this documentation: <https://confluence.atlassian.com/display/DOC/Using+Apache+with+mod_proxy>  

For Bamboo:  
<https://confluence.atlassian.com/display/BAMBOO/Changing+the+Root+Context+Path>

For Fisheye:  
<https://confluence.atlassian.com/display/FISHEYE/Configuring+the+FishEye+web+server>

For JIRA:  
<https://confluence.atlassian.com/display/JIRA/Integrating+JIRA+with+Apache>

I hope this helps.  

Cheers,  

WZ

comments: author: Tim_Brigham
body: My applications each have a dedicated server to support them and none are using Apache as a front end. As such I specifically want to keep the context path as root for these hosts. Any other suggestions?
How we will get the all user directories
Asked by Mahipal Reddy:

Hi,

How we will get the all user directories?

what is the bean name we need to use to get Ldap,Intenal With Ldap Authentication and Active Directory

below code we are using.

private DirectoryManager getDirectoryManager()

{

if (directoryManager == null)

directoryManager = (DirectoryManager) ContainerManager.getInstance().getContainerContext().getComponent(ldapDirectoryManager);

return directoryManager;

}

private DirectoryInstanceLoader getDirectoryInstanceLoader()

{

if (directoryInstanceLoader == null)

directoryInstanceLoader = (DirectoryInstanceLoader) ContainerManager.getInstance().getContainerContext().getComponent(directoryInstanceLoader);

return directoryInstanceLoader;

}

<br />


Answers:
author: Florin Manaila
body: Hi,

Try this:

```
ComponentAccessor.getComponentOfType(CrowdDirectoryService.class).findAllDirectories()
```

HTH,

Florin


Tags: directory

ldap
Unicode characters in user names ( Confluence Crowd Active Directory MySQL)
Asked by R:

Problem:

* You are using crowd for authentication and user directory is an Active Directory Server
* Confluence caches the crowd user database in its own mysql database.
* User display names contain UTF-8 characters.
* **Logged in user display name is not shown correctly.**


Answers:
author: R
body: How to fix it:

* Find your confluence.cfg.xml ( in my case /var/atlassian/application-data/confluence/confluence.cfg.xml)
* find the property name "**hibernate.connection.url**"
* add **\&amp;characterEncoding=utf8\&amp;useUnicode=true** to the end of the value
* restart confluence

comments: author: Ansar Rezaei
body: Hi  
Thanks  
What's your suggestion for MS SQL 2012?


Tags: active-directory

confluence

mysql

utf
How do I let users sign-up for Crowd accounts on their own?
Asked by Hemal Udani:

We are using Crowd with JIRA and Confluence. In Crowd, we have an LDAP directory (delegated) and a regular Crowd directory. We would like to allow users to self-sign-up to get accounts in the Crowd directory. When the customer visits JIRA login page, or Confluence login page, or the Crowd login page, they should see a link to Sign-up for an account. And when they do, that would create a Crowd directory account.


Answers:
author: GuilhermeA
body: Hello Hemal,

Unfortuantely this is not yet implemented, due this improvement:

* https://jira.atlassian.com/browse/CWD-410

However searcing through answers I could see that there are some users trying to create a function that would automatically create users. This needs some further development, but could be of use to you:

* [https://answers.atlassian.com/questions/746/how-to-create-a-user-with-crowdservice](/questions/746/how-to-create-a-user-with-crowdservice)

And there is the Developer documentation that makes use of REST API that would call a create user trigger.

* <https://developer.atlassian.com/display/CROWDDEV/Crowd+REST+APIs>

Sorry that I could not prompt you with a direct answer on how-to, but this will help you get on the right track I guess.

Cheers,

Guilherme