youngmon/atlassian-qna huggingface dataset:
How can i set how many releases i want to keep per environment in Bamboo
Asked by Alexandros Ananikidis:

In the global expiry settings in Bamboo i have set to keep at least 10 releases per environment(see image 1 below)

**Image 1**

![image1.png](/t5/image/serverpage/image-id/36869iAE49273F4E5220A4/image-size/large?v=v2&px=999 "image1.png")

Nevertheless, when i navigate to a certain deployment environment, it is detected that it keeps 25 releases(see image 2 below).

**Why is that happening and how can i set how many releases i want to keep per environment except through the global expiry settings**?

**Image 2**

![image2.png](/t5/image/serverpage/image-id/36870i08C538F862EC4E6C/image-size/large?v=v2&px=999 "image2.png")


Answers:
author: Foong
body: Is the release-272 created more than 7 days ago?

The expiry will look for all releases created more than 7 days ago first to be expired. If there are a lot of releases expired due to 7 days condition causing the number to be less than 10 per environment, it will keep the latest 10 successful releases per environment.

comments: author: Alexandros Ananikidis
body: Hello and sorry for my late reply. Yes the release-272 is older than 7 days. I understand what you mean about keeping the latest 10 successful releases per environment. But still as the image shows it keeps showing the last 25 releases instead of only the last 10.


author: Foong
body: If the 25 releases are not older than 7 days, it will not be deleted.

Example 1:

1. Release 1 - 11 days
2. Release 2 - 10 days
3. Release 3 - 9 days
4. Release 4 - 8 days
5. Release 5 - 7 days
6. Release 6 - 6 days
7. Release 7 - 5 days
8. Release 8 - 4 days
9. Release 9 - 3 days
10. Release 10 - 2 days
11. Release 11 - 1 day

Release 1 will be deleted. Release 2-5 are not deleted due to 10 successful deployments to be kept. Release 6-11 not more than 7 days.

Example 2:

1. Release 1 - 11 days
2. Release 2 - 10 days
3. Release 3 - 9 days
4. Release 4 - 8 days
5. Release 5 - 7 days
6. Release 6 - 6 days
7. Release 7 - 5 days
8. Release 8 - 4 days
9. Release 9 - 3 days
10. Release 10 - 2 days
11. Release 11 - 1 day
12. Release 12 - 1 day
13. Release 13 - 1 day
14. Release 14 - 1 day
15. Release 15 - 1 day
16. Release 16 - 1 day
17. Release 17 - 1 day

Release 1-5 will be deleted. Release 6-17 (total 12) not deleted cause not more than 7 days yet.

If release-272 is older than 7 days but still not deleted now, it means there is a problem with the deletion process. Need to check the log during the deletion scheduled time.
PACK File Worth keeping if they are 4-6 months + old?
Asked by Robert Webster:

Looking to clean up some space.... wondering if I can safely delete pack files.

thanks in advance!

Robert


Answers:
author: Gerhard Forster
body: Hi Robert,

find the KB below as a great reference for doing that: <https://confluence.atlassian.com/bamboo/deleting-the-results-of-a-plan-build-289276916.html>

So you can delete directly from Bamboo UI's Dashboard plan results, as illustrated in this document or, alternatively, use Bamboo's Expiry feature (globally or on plan level).

Utilizing Expiry you find the granularity to delete Build results, Build artifacts and/or Build logs (and combinations of thoses). Typically artifacts consume most disk space.

Note that this is the only recommended way deleting Bamboo build results! Do not delete them simply from disk or you mess up Bamboo's database.

Also take care that you only delete what you don't use anymore e.g. in subsequent deployments or as releases.

Hope that helps.

Kind regards,

Gerhard


Tags: bamboo-administration
How can I share environment modules between tasks in a job without loading them for every task?
Asked by Samuel:

My plan consists of many jobs and many script tasks in each of those jobs.  

Most of these scripts rely on the same 5 or 6 modules that I am loading every time, for example:  
"module load python/argparse_py2.7/1.2.1  
module load python/python/2.7.13"  

Instead of having to load these environment modules for every task, is there a way to load them once and have all subsequent tasks be able to access them?


Answers:
author: Gonchik Tsymzhitov
body: Hi!

Maybe one requirements.txt and check compatibility in initial task

Cheers,

Gonchik Tsymzhitov


Tags: module

task
Bamboo Remote Agent Trial License
Asked by tdzarnes:

I have a trail license for a test instance of Bamboo and I want to setup a test instance of a remote agent to test out upgrading to the latest. We are currently on Bamboo version 5.1.5.01. Is there such as thing as a remote agent trail license? We have plenty or licenses for remote agents for production. Or is it preferred to connect my test Bamboo instance to a production remote agent by running the remote agent install steps and passing the Bamboo test instance server information?


Answers:
author: Foong
body: There is no separate license for remote agent installation. You can install remote agent without inputing any license in the remote agent side.
I am at the starting data selection screen.
Asked by Robert Webster:

My old bamboo was running just fine I am ugrading so that we can use LDAP.  

wondering the correct Format to enter the file path in? Is this to the actual database file? raw? how do you want the data if that is not correct.  

Thanks in advance


Answers:
author: Foong
body: Upgrading Bamboo should not have the Installation Setup. It should detect the old database and Bamboo Home and proceed with the upgrade.

Make sure that the following steps are performed:

1. Configure the new Bamboo to use the old Bamboo Home at **\<newBambooInstallation\>/atlassian-bamboo/WEB-INF/classes/bamboo-init.properties** (the new Bamboo will read the database setting inside the Bamboo Home and proceed with the upgrade)
2. Copy over the extra settings (if any) from the following old Bamboo files
   * **\<oldBambooInstallation\>/bin/setenv.sh** or**setenv.bat**
   * **\<oldBambooInstallation\>/conf/server.xml**
   * **\<oldBambooInstallation\>/conf/web.xml**
3. Start the new Bamboo

comments: author: Robert Webster
body: I did this, yet I still got the prompt for enter the file path to the existing data?????


author: Foong
body: Bamboo Home is the directory where the file **bamboo.cfg.xml** is located.

Is that directory configured in the file **bamboo-init.properties**?


author: Foong
body: Does the file **bamboo.cfg.xml** in the old Bamboo Home have the same content as the one in the new Bamboo Home?

If not, then the new Bamboo Home generated the file when it is started last time.

You will have to delete the entire new Bamboo Home and then copy over the old Bamboo Home content to the new Bamboo Home before starting the new Bamboo.


author: Robert Webster
body: actually checked a couple o tables on the New database it is working

no, the above is not true


author: Robert Webster
body: Yes, the old bamboo home is what is in that file. Just the path.

Old bamboo= d:\\bamboo-home

New bamboo = c:\\bamboo-home514


Tags: bamboo-administration
Bamboo server installation with configuration management
Asked by Jonathan:

I am automating the install and configuration of a bamboo server using an external MySQL database with ansible configuration management. I would like to add the database connection and license info into source control, but it isn't clear if these setting can be programmatically set in the bamboo.cfg.xml during server provisioning or always require a first initial setup via the web UI. Has anyone else accomplished this? If so, could you provide an example?


Answers:
author: Gonchik Tsymzhitov
body: Hi!

let's configure once, and reuse bamboo.cfg.xml in your autmatisation

Cheers,

Gonchik


Tags: ansible
How do I provide a maven settings.xml file including credentials
Asked by Jon Freedman:

In Jenkins I can create a template settings.xml with the config file provider and inject credentials from the credentials store. How do I do that in Bamboo?


Answers:
author: Gonchik Tsymzhitov
body: Hi!

By variables

<https://confluence.atlassian.com/bamboo/bamboo-variables-289277087.html>


Tags: maven
Bamboo and CVE-2018-1327, for Apache Struts Vulnerability?
Asked by Brian Hecko:

Bamboo and CVE-2018-1327, for Apache Struts Vulnerability? I see other posts where Bamboo is not susceptible to several of the Apache Struts vulns, but just want to confirm this particular CVE also. Thanks. We are using Nexpose as our security scanner.


Answers:
author: Alexey Chystoprudov
body: Bamboo doesn't use Struts REST plugin so it's not affected

comments: author: Gonchik Tsymzhitov
body: [@Alexey Chystoprudov](/t5/user/viewprofilepage/user-id/781646)

Thanks for your answer : )


author: Brian Hecko
body: Thanks for the reply and info, much appreciated.


author: Gonchik Tsymzhitov
body: Hi [@Brian Hecko](/t5/user/viewprofilepage/user-id/2219504)

As I read from [here](http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=struts) . CVE related DoS attacks from XStream library for version \< 2.5.16

Have you checked on latest version of the Bamboo

<https://confluence.atlassian.com/bamboo/bamboo-6-7-release-notes-959795979.html> ?

As I see latest version should not be affected, because Atlassian upgraded to 2.5.17 Struts

Reference:

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

Cheers,

Gonchik Tsymzhitov

comments: author: Brian Hecko
body: Ah, will look into upgrading to 6.7 soon. Just finished upgrading to 6.6.3 recently.
Specs Scan stucks is in "in progress" state
Asked by dimapasko:

I am successfully using Spec for a while.  
But for the one project, I haven't received bamboo spec update after checking "Spec Status" tab found this:

![spec-scan.png](/t5/image/serverpage/image-id/36663iEF5AB80641AE0D3B/image-size/large?v=v2&px=999 "spec-scan.png")

I haven't found any noticeable errors in bamboo.log.

How could I check what is happening?

And how to fix it?


Answers:
author: Alexey Chystoprudov
body: It's better to create support request at support.atlassian.com so support engineers can check server logs to see what's happening


Tags: spec
CLI to add Task: Maven Dependencies Processor
Asked by Maciej Miklas:

I would like to add Maven Dependencies Processor over CLI (for 270 projects), however I am unable to find out the value for taskKey

I've added this task over UI to a project and queried all tasks over CLI, unfortunately this is the only one without taskKey.....

I've tried to debug network traffic when modifying this task over browser, but it has only taskId = 12, no key.


Answers:
author: Maciej Miklas
body: Okay.... it is: com.atlassian.bamboo.plugins.maven:task.mvn.dependencies.processor

I was able to find it in task list one the page where you can add new task to project. Each task has URL and it contains task key :)


Tags: cli
how to deploy nodejs repository
Asked by developer learn999:

Hi

i want at first to take the whole project,

zip it and copy to destination folder.

the last part i know how to do, but how do i build

and artifact which is a zip file with the whole project?


Answers:
author: Gonchik Tsymzhitov
body: Hi!

What about using git for cover those steps?

git clone - git pull - git checkout

And automated it by Bamboo tasks

Cheers,

Gonchik Tsymzhitov


Tags: node.js
TestNG Results with dataProvider
Asked by Ren? Habermann:

Hi,

it seems the testNG Results parser does not properly recognize tests that are executed through a data provider (or at least not in the way i'd expect).

In example, we have a test that is executed 100 times with different data. For 20 of those cases, the test fails. Bamboo will then show this as 1 failed test containing a single failed instance of this test method and one successful test. This omits both the 19 other failed tests and the 79 other successful tests, so i need to rely on the html report completely. I suspect this has to do with each of the 100 tests named exactly the same (as usual with data provider).

Is anyone familiar with this? Is this the intended state? Does anyone know how to display (in this case) all 100 test results in the frontend, instead of only one or two?


Answers:
author: Chris Berry
body: Hi [Ren?](https://community.atlassian.com/t5/user/viewprofilepage/user-id/1586909).

Yes, this relates to [BAM-17738](https://jira.atlassian.com/browse/BAM-17738). We parse the xml file and record success or failure for a specific test using the "name" field as the identifier. I believe in your case the "name" for all your test cases are identical and hence Bamboo only displays the one entry.

I've added this community entry to the bug to help raise its visibility with the developers.

thanks

Chris

Atlassian support - Bamboo


Tags: test
REST API Call to get pending deployment
Asked by ishan_walawalkar:

Hello,

I'm trying to call Bamboo rest api to get pending deployment and Trigger deployment for deployment environment and version . Below are the API's

[http://myhost.com:8085/rest/api/latest/queue/deployment](http://myhost.com:8085/rest/api/latest/queue/deployment?)

However im getting below error :-

```
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<status>
<status-code>404</status-code>
<message>null for uri: http://192.168.2.67:8085/rest/api/latest/queue/deployment</message>
</status>
```

Can someone help me with this?


Answers:
author: Jeremy Owen
body: Hi Ishan,

Judging by the response -- the REST endpoint doesn't exist on your Bamboo instance. Which version of Bamboo are you running?

We first introduced the /queue/deployment endpoint in Bamboo 5.11:

* <https://docs.atlassian.com/atlassian-bamboo/REST/5.11.0/#d2e1037>

If you're running older than 5.11, you'll need to upgrade to utilize that API.

Cheers,

Jeremy

comments: author: ishan_walawalkar
body: Thanks Jeremy.. I was using older version. I have now upgraded and its working..!!!


author: Edwin Kyalangalilwa
body: Hi [@ishan_walawalkar](/t5/user/viewprofilepage/user-id/1878347),

What is your Bamboo base URL

<http://myhost.com:8085/>

or

<http://myhost.com:8085/bamboo/>

Try running

```
curl 'http://localhost:8085/rest/api/latest/queue/deployment' -u admin:admin -H "Accepts: application/json"
```

comments: author: ishan_walawalkar
body: Hi Edwin,

Thanks for your quick response . I was using older version of bamboo hence getting error. I have upgraded now . Its working.
How disable bamboo varibale logging for ScriptTask?
Asked by Andrey Budaev:

I have try add in section Bamboo log settings this classpath **com.atlassian.bamboo.plugins.scripttask** and set log level = FATAL, but nothing changes.

Please help.


Answers:
author: Chris Berry
body: Hi [??????](https://community.atlassian.com/t5/user/viewprofilepage/user-id/256091)

Can you confirm that you want to disable the variables listed in the build logs that refer to the command executed and the environment that is being passed to that command. eg.

```
command 02-Nov-2018 15:40:41 Beginning to execute external process for build 'tst - sh - Default Job #85 (TST-SH-JOB1-85)'\n ... running command line: \n/home/bamboo/bamboo-home-postgresql/temp/TST-SH-JOB1-85-ScriptBuildTask-4849783941163340321.sh\n ... in: /home/bamboo/bamboo-home-postgresql/xml-data/build-dir/TST-SH-JOB1\n ... using extra environment variables: \nbamboo_planRepository_1_branch=master\nbamboo_planRepository_1_branchDisplayName=master\nbamboo_repository_revision_number=1fa10f1655686a6338e1c582ce53e9890c860b6a\nbamboo_repository_16809985_git_username=\nbamboo_resultsUrl=http://linuxenv:8085/bamboo/browse/TST-SH-JOB1-85\nbamboo_build_working_directory=/home/bamboo/bamboo-home-postgresql/xml-data/build-dir/TST-SH-JOB1\nbamboo_planRepository_1_name=tstrepo\nbamboo_buildKey=TST-SH-...
```

This output is logged in the class com.atlassian.bamboo.processProcessServiceImpl at level INFO.

If you disable this logging it will remove the whole text including the command executed.

It will also remove the text for any other external process run by the agent.

There is no way to disable the environment variable part of the text.

I would recommend not disabling this logging :)

Let me know if I have got this wrong and it is something else you wish to disable..

thanks

Chris

Atlassian support - Bamboo

comments: author: Andrey Budaev
body: Hello, Chris.

Yes, you understand me correct. It is a pity that there is no such possibility.


author: Alexey Chystoprudov
body: There's feature request to add such configuration <https://jira.atlassian.com/browse/BAM-18294>


Tags: log

task
Permissions trouble
Asked by ?????? ???????:

Hello. We are using Bamboo in docker container (created by our team Dockerfile and docker-compose.yaml) and every time upgrade version wasn't create a trouble, but at that time. We upgrade Bamboo from 6.6.3 to 6.7.1 and now when task "source code checkout" started, it broke file permissions: owner and group don't change, but permissions for other is fully lost (i.e. rwxr-xr-x -\> rwxr-x---). What happens? What should I do?

drwxr-x--- 9 root root 4096 Nov 1 15:46 ./

drwxr-xr-x 60 root root 4096 Nov 1 15:46 ../

drwxr-x--- 8 root root 4096 Nov 1 15:46 .git/

-rw-r----- 1 root root 134 Nov 1 15:46 .gitignore

-rw-r----- 1 root root 154 Nov 1 15:46 Dockerfile

drwxr-x--- 12 root root 4096 Nov 1 15:46 app/


Answers:
author: Chris Berry
body: Hi ??????,

Bamboo 6.7.1 ships with a new version of Tomcat. The \<Bamboo-install\>/bin/catalina.sh script now sets the default umask to 027. This will mean that any file created by the Bamboo JVM and any of its child processes will apply that umask and strip the other permissions.

The workaround would be to set the UMASK=022 environment variable before starting Bamboo.

We will confirm with the developers and workout a longer term solution and/or document this behaviour change.

Although, having a umask of 027 if better from a security perspective, it is a change in behaviour.

thanks

Chris

comments: author: ?????? ???????
body: Wow, fantastic! I was look up at many paths, but nowhere had seen umask=027. Thank you!

In my case, Bamboo run in container from 'root' and in some jobs it's create artifacts for non-root user, so I must have umask 022 instead 027.


author: Joris van Eijden
body: Having this in the release notes somewhere would have saved me a lot of time.

Took me half a day to find this. Super happy it's fixed now though :)


author: Cory Galloway
body: Yes, can someone point me to the Release Notes with this change? It caused some of our deploys to fail as the user deploying no longer had read on the checked-out repo.


author: Chris Berry
body: Hi [??????](https://community.atlassian.com/t5/user/viewprofilepage/user-id/1709253)

Has there been any changes to the agent system that runs this job?

Docker will inherit the system umask setting. If the system umask is set to 07

then you will see the behaviour you describe.

thanks

Chris

Atlassian support-Bamboo

comments: author: ?????? ???????
body: Properties of agents are not changes. I just create new docker image with 6.7.1 instead 6.6.3 and run it. Without change any settings of Bamboo.

Nowhere in profile and other files has umask settings. I downgrade to 6.6.3 and it's work fine. Home directory (/home/bamboo) is mounting into container, but in 6.7.1 Bamboo had trouble with permissions. What else may be wrong?


Tags: permission
Bamboo XCODE Playbook
Asked by Jeremy_Shutt:

I'm looking to setup a CI pipeline for both Windows builds and iOS (XCODE) builds from a single Bamboo instance.

For example:

Get from GitHub

Build XCODE

Send to HockeyApp

[There's this plugin that looks pretty much abandoned](https://marketplace.atlassian.com/apps/472949/ios-cocoa-and-xcode-support-for-bamboo?hosting=server&tab=overview)

[There's an open source maven project that looks to be recent that is a fork of the plugin above](https://mvnrepository.com/artifact/com.atlassian.bamboo.plugins.xcode/bamboo-xcode-plugin/6.0)

I'm basically looking for a basic cookbook on how others have used a single Bamboo server (local hosted version 6) to kick of builds of iOS and Windows. I really don't want to have to build another build server.

Thanks in advance.


Answers:
author: Foong
body: > [There's this plugin that looks pretty much abandoned](https://marketplace.atlassian.com/apps/472949/ios-cocoa-and-xcode-support-for-bamboo?hosting=server&tab=overview&_ga=2.153907579.255713774.1541403135-1822854687.1458744552)

That plugin has been bundled into the latest Bamboo. You can create Xcode and Fastlane tasks in Bamboo without that plugin.

[Bamboo 6.0 Release Notes](https://confluence.atlassian.com/bamboo/bamboo-6-0-release-notes-894743804.html)

comments: author: Jeremy_Shutt
body: Thank you Kah!
Bitbucket change no longer being detected
Asked by Anthony Tyler:

for a few days, Bamboo is not detecting changes to bitbucket, we are having to create branches and run manually. No changes have occurred in Bamboo, we have version 5.14.0.2 build 51412 - 31 Oct 16


Answers:
author: Anthony Tyler
body: we checked logs, but found nothing to relate to the issue. We rebooted the server - it picked up new branches but existing one's we had to re run.... very odd


author: Daniel Santos
body: Hi Anthony,

This is what I suggest:

1. Try to find messages like this one in your Bamboo logs (\<Bamboo_Home\>/logs/atlassian-bamboo.log).

```
2018-10-23 19:44:21,533 INFO [http-nio-8085-exec-6] [com.atlassian.bamboo.filter.AccessLogFilter] 127.0.0.1 POST http://<BAMBOO_URL>:8085/rest/remote-event-consumer/latest/events/stash-branch-changed-remote-event 319491kb
```

This event should come up if the application links are properly configured.

2. Check if there is any recent change in Bamboo URL or even in Bitbucket URL that should be adjusted in the server.xml or bitbucket.properties configuration files.  
If you notice that any change is needed, stop the system, perform the change, start the system and recreate the application link.

3. Even if you don't find any differences, try to recreate the application links

Some resourceful documents:

* [Securing Bamboo with Apache using SSL - Atlassian Documentation](https://confluence.atlassian.com/bamboo/securing-bamboo-with-apache-using-ssl-391087437.html)
* [Securing Bamboo behind nginx using SSL - Atlassian Documentation](https://confluence.atlassian.com/bamkb/securing-bamboo-behind-nginx-using-ssl-829075298.html)
* [Proxying and securing Bitbucket Server - Atlassian Documentation](https://confluence.atlassian.com/bitbucketserver/proxying-and-securing-bitbucket-server-776640099.html)

Please share with us your findings.
Permission to configure the service portal help center?
Asked by Erik Reiter:

Hi,

i want the possibility to get one of our agents to customize the help center with articles and topics.

Is therey any way to specify the permission, withouth giving him full jira adminstrator rights?


Answers:
author: Rilwan Ahmed
body: LHi [@Erik Reiter](/t5/user/viewprofilepage/user-id/5253089) ,

On project level, Project administrator role will grant the access.  
i.e. User can update some details Project settings --\> Portal settings --\> **Portal configuration**

and also they can add some description for each Request type in "**Request type description** "   
(Project settings --\> Request type --\> Click on required type)

As for whole site, it is only possible for Jira administrators.


Tags: cloud

jira-service-management

jira-service-management-cloud
Issue with setting Dates to the Future
Asked by Arvin M:

Hi All,

We have date fields for which we sometimes need to set to the future (12-31-2099). When this is done and the issue is refreshed, it goes back to 12-31-1999.

Is this issue prevalent for other customers as well? Is there a workaround?

Thank you very much.

Warm Regards,

AM


Answers:
author: Jack Brickey
body: Hi have seen similar posts in the past. Does this happen with the due date field or only custom date fields? I'm trying to recall if there is some known limitation. I can try testing myself in a bit if I know more specifics about where you're seeing this. I did do a quick test on the due date and it seems to work fine.


Tags: cloud

jira-service-management

jira-service-management-cloud