youngmon/atlassian-qna huggingface dataset:
Bamboo Deployment Triggers
Asked by Venkat Pasula:

We are using Bamboo Version 6.4.0. We have 6 Environments in a Bamboo Deployment Plan as shown below

Env1  
Env2  
Env3  
Env4  
Env5  
Env6

We want Env6 to be executed only after Env1 thru Env5 are successfully deployed.  
We set the Triggers accordingly ( After Successful deployment of Env1 thru Env5).  
This setup seems not working if any of the Dependent enviroments ( Env1 thru ENV5) fails.

Can someone suggest a work around for this?.


Answers:
author: Venkat Pasula
body: Rajath,

Thank you so much for your reply. I think you din't understand our situation.Let me explain you our situation one more time.

We have Bamboo Deployment Plan which has 6 deployment environments ( **Env1 , Env2 ,** **Env3, Env4 , Env5 and Env6** ).

We want **Env6** to deployed only if all of the depending Environments ( **Env1 , Env2 ,**   
**Env3, Env4 , Env5**) are deployed successfully.

We setup the Triggers for **Env6** accordingly ( After Successful deployment of **Env1** thru **Env5** ).We were expecting **Env6** will be deployed only once ( when all of the **Env1** thru **Env5**are deployed successfully.

But the problem is sometimes **Env6** is being deployed 5 times which means , **Env6** is being deployed immediately after **Env1 , Env2 ,** **Env3, Env4 , Env5**are deployed.

comments: author: Rajath Veeramanchala
body: Venkat,

If **Env6** is deploying five times, I guess you have given 5 triggers for it to trigger. That is not the ideal case. If you want to trigger **Env6**only after all the other environments are successful, you should follow the method like I said.

Your method (assumption) :

Triggers in **Env6 :** **Env1 , Env2 ,** **Env3, Env4 , Env5**

This will result in triggering **Env6** everytime one of the **Env1 - Env5** are successful making 5 deployments for **Env6**

Correct way :

Triggers in **Env2 : Env1**

Trigger in **Env3 : Env2**

Trigger in **Evn4 : Env3**

Trigger in **Env5 : Env4**

Trigger in**Evn6 : Env5**

This way **Env6** will trigger only after all the first **5** **Env** are successful. Also if any of the first 5 fails it\`ll stop the flow and **Env1**can be triggered manually or by the bamboo plan providing artifacts to it.

Hope this helps.

Regards,

Rajath


author: Rajath Veeramanchala
body: Hi Venkat,

You can have a **After Successful deployment** trigger in each environment with the triggering environment being the previous environment as shown below :

If you have three environments dev, qa , prod. Configure triggers only in qa and prod with triggering environment as below :

dev \<- can be triggered from bamboo plan or can be manual

qa \<- dev ( triggered by dev deployment once it is success )

prod \<- qa ( triggered by qa deployment once it is success )

Do not create multiple triggers like below :

qa \<- dev

prod \<- dev , qa

By doing so , prod will trigger in cases dev is successful but qa failed.

Hope this helps.

Regards,

Rajath


Tags: deployment

trigger
Creating/retrieving encrypted passwords for bamboo java specs
Asked by m kalksma:

We are migrating all our build plans to Bamboo Java specs and face the issue of managing passwords in this way.

For example a tomcat or SCP task we can manually setup the task in the UI and view the plan as Bamboo Java Specs to extract the encrypted password.

Is there any other way, or in the pipeline, to extract those passwords? For example when a password changes we first have to manually build the build plan again so we can retrieve the updated encrypted password. Which mostly goes against the principle of using Bamboo Specs.

Is there maybe a Maven goal or something similar that can be used to encrypt a plaintext password so we can include it in our builds?


Answers:
author: Foong
body: Feature request <https://jira.atlassian.com/browse/BAM-20131>


Tags: spec
Build failed
Asked by Erik Boman:

Hello, i have trouble building with bamboo version 5.7.2.

I suspect the problem is with a path to "Program Files/..." but i cant find the exact place of the error.

```
"Could not find test result reports in the C:\company\bamboo-home\xml-data\build-dir\company-company-JOB1 directory.

BUILD FAILED
Target "Files" does not exist in the project "company6 Build". 

Total time: 0 seconds
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8"
```

Could it be the -Djava.io.tmpdir that has no citation marks that causes the build to fail?

```
C:\company\apache-ant-1.9.4\bin\ant.bat -Djava.io.tmpdir=C:\Program Files\Bamboo\temp\company-company-JOB1 -f build.xml
```


Answers:
author: Edwin Kyalangalilwa
body: Hi [@Erik Boman](/t5/user/viewprofilepage/user-id/1912199),

Yes you're correct. The marks around -Djava.io.tmpdir="" is what is causing the error.

comments: author: Erik Boman
body: Where can i edit this flag?


author: Edwin Kyalangalilwa
body: You can try changing the path of tmpdir or specifying the same path with double quotes.

```
<bamboo-agent-home>/conf/wrapper.conf
```

Adding an additional line. For example:

    wrapper.java.additional.3=-Djava.io.tmpdir="E:\temp\"


author: Erik Boman
body: I do not have a wrapper.conf file, as i understand the setenv.bat file should be the equivalent. Can i set the tmpdir there aswell?
Bamboo Error: Parent Directory Doesn't Exist for Branch Build
Asked by Tim_Wirtjes:

I get the following error for a branch based build.
>
> |----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
> | 10-Sep-2018 20:21:23 | {:timestamp=\>"2018-09-10T20:21:23.941063+0000", :message=\>"Parent directory does not exist: javelin2_0.3.3-1.20180910202123.bugfix - cannot write to javelin2_0.3.3-1.20180910202123.bugfix/CN-2152-javelin-is-unable-to-provision-vms_amd64.deb", :level=\>:fatal} |
>
> <br />
>
> <br />
>
> ![image.png](/t5/image/serverpage/image-id/31878iC5DEED91D3F21440/image-size/large?v=v2&px=999 "image.png")  
> All other parameters are the defaults. I've done alot of searching but am not able to find anything addressing this error.


Answers:
author: Daniel Santos
body: Hey Tim,

Can you share with us were this error was observed and the set of steps taken to reproduce it?

Possible troubleshooting steps:

1. Find differences between branches that work and this one.
2. Clone this branch from outside Bamboo and verify if you will experience any error.
3. If your repository is not that big, try to clean the repository cache: \*Cog icon \>\> Overview \>\> Repository settings\*.
4. Try to navigate to that folder and check the permissions involved. Is the user running the agent/server able to edit that folder?  

Please share with us your findings.


Tags: branch
Bamboo JDBC Connection to SQL Express
Asked by Ryan Strope:

Trying to configure our Bamboo Server to use a SQL Server Express instance and the Custom Installation wizard just spins and returns to the Choose how you wish Bamboo to connect to your database

i've verified every setting from tcp/ip to varying the uri i'm using to identify the SQL Server instance

Nothing works

the Bamboo instance and the SQL Server Instance are on the same physical server


Answers:
author: Daniel Santos
body: Hello Ryan,

It could be a problem not related to the DB configuration as well.  

This are the troubleshooting steps I probably follow:

1. Check the server logs  
   Unix like:**\<Bamboo_Install\>/logs/catalina.out**   
   Windows :**\<Bamboo_Install\>/logs/bamboo-stdout.\<DATE\>.log**
2. If the problem is related to the DB, please make sure:
   1. Your database was created following this document: [Microsoft SQL Server - Atlassian Documentation](https://confluence.atlassian.com/bamboo/microsoft-sql-server-289276827.html)
   2. Your connection string is something like:

      ```
      jdbc:sqlserver://localhost:1433;databaseName=<DB_NAME>
      ```

   3. Your SQL server has a supported version:  
      [Supported platforms - Atlassian Documentation](https://confluence.atlassian.com/bamboo/supported-platforms-289276764.html)
3. If the problem is different, please paste the error here

comments: author: Ryan Strope
body: Turned out the Server that was setup for me to use had MS SQL Server 2017 installed so I just had to set the DB compatibility and everything was copacetic.

Thanks for the help
How to run Java Project using Bamboo?
Asked by Gaurav Dighe:

I have a java project created in eclipse with test cases. I want to run that test cases using bamboo, but without maven, ant or grails. All my libraries are all ready added to classpath. Please assist.


Answers:
author: Anonymous Coward
body: Simon says:

"

First run your Java application from a command line, outside Eclipse. Verify that it works correctly.

Then Create a Script task in one of your Bamboo plans and run the same command that you run on the command line from the script task.

"

Simon out.
Our build plan seems not to include new files from a recent branch merge
Asked by Nicholas Aysen:

We have just merged a large project into our main development branch.

Our source repository, on Bitbucket, has the files that we merged

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

However, our build plan on Bamboo doesn't seem to include these files.

This is the first time we have included changes on our web project. Our other projects, being normal console applications, have new files all the time and they are always built.

I have checked the package that is built, and the files are indeed not there

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

Is there a way to include these changes in our build? As sated, they do exist on the repository but not on the build. They are there, just not on the finished product.


Answers:
author: Daniel Santos
body: Hi Nicholas,

It is difficult to know what is happening there since we don't have all the details, but I can share with you what would be my possible troubleshooting steps on this scenario:

1. Make sure the data is indeed in your development branch.  
   Try to use the Windows or Linux terminal (avoiding Bamboo) to checkout the development branch and make sure the files will be there.
2. If the files are there, check if Bamboo is checking out the files by adding a script task, right after the checkout script, to list all files or just navigating to the working directory folder (get the exact folder location from the build logs).
3. If the files are not there:
   1. let's make sure Bamboo development branch is really the branch being built.
      1. If it is set on the default branch, check the plan repository configuration or the linked repository used depending on what is configured. The development branch should be configured there.
      2. If it is set on an extra plan branch, please check if the plan branch was not overwritten with a different source code branch.
4. If build results you are checking are coming from an artifact, please check the artifact definition to make sure covers the copy of those extra files
5. Try to refresh the repository cache (Cog icon \>\> Overview \>\> Repository settings)

I hope it helps.

comments: author: Nicholas Aysen
body: Hi. Thanks for the tips. It seems as though one of our devs commented out the actual build for that project, so it always took the last build, which of course doesn't include the files. Fixed that and the files are there.


Tags: bitbucket

bitbucket-server

build

server
Bamboo Export / Import failing with invalid null char
Asked by Alex Hall:

I'm trying to preform an export but didn't realize the export had failed until I tried to import into a fresh install same version (but linux server not windows, same Bamboo version)

I think I narrowed the issue to the export failing at:

E:\\Atlassian\\bamboo5\\exports\\export_atlassianbamboo_5920_20180908.zip\\db-export\\loginInfos.xml  
2018-09-08 19:14:22,687 INFO \[http-nio-443-exec-17\] \[XmlMigrator\] Exporting with: com.atlassian.bamboo.migration.stream.LoginInformationMapper  
2018-09-08 19:14:23,594 INFO \[http-nio-443-exec-17\] \[XmlMigrator\] Ensuring the the file has been unmounted  
2018-09-08 19:14:23,594 INFO \[http-nio-443-exec-17\] \[XmlMigrator\] Unmounted E:\\Atlassian\\bamboo5\\exports\\export_atlassianbamboo_5920_20180908.zip  
2018-09-08 19:14:23,641 ERROR \[http-nio-443-exec-17\] \[Export\] com.ctc.wstx.exc.WstxIOException: Invalid null character in text to output

.....

Any ideas, I'd be happy to provide more info if needed.


Answers:
author: Daniel Santos
body: Hey Alex,

It took me a while to realise that the class**com.atlassian.bamboo.migration.stream.LoginInformationMapper** does not exist in bamboo versions after 5.9, this happens to be the same for the **loginInfos.xml** file (at least for Bamboo 6.6.2).

Your export seems to have failed to write values to the **loginInfos.xml** file due to a special char saved in your bamboo db. The information who populates this file is stored in the **AUTH_ATTEMPT_INFO** table. It just registers details about failed user login attempts and can be cleaned.

Suggested steps to overcome this issue:

1. Create a database backup of your Bamboo DB (using your external tool)
2. Check the values in **AUTH_ATTEMPT_INFO** (either fix them or remove the rows)
3. Create another export and check it succeeds without errors

I hope it helps.

Regards,  
Daniel P Santos \| Atlassian Support

comments: author: Alex Hall
body: Thanks Daniel!

This looks to be the answer! I briefly looked at the data in **AUTH_ATTEMPT_INFO**, and sure enough the data looks a bit wacky. Its possible the data is from an attack or vulnerability scan.

I haven't yet had the opportunity to remove the rows from that table or preform another export. I'm confident this is solution will work!

- Alex


author: Daniel Santos
body: Hey Alex,

Good to know you found something there.  
I hope that is the only issue with the export =\]  

Take care!
How to rerun Bamboo Deployment Rollback Task ?
Asked by Venkat Pasula:

Hello All,

Due to some network issues one of our Bamboo Deployment Rollback Task failed.

Now we are trying to rerun the same the failed Bamboo Deployment Task .

But the problem is bamboo is setting **bamboo.deploy.rollback** variable to **false**.

How do I rerun Deployment Task with **bamboo.deploy.rollback=true?.**

Is there a way to set/override the **bamboo.deploy.rollback** variable to**true?.**


Answers:
author: Dineshmathiazhagan
body: bamboo.deployment.rollback will become true if your release name is different from the current deployed and data-id time stamp is older .

And rollbacked version becomes current irrespective of success or failure - on re applying rollback for same release is not possible

So make it a configurable variable and use both inbuilt and configured so inbuilt will give you option to delink associated jira id's and user defined will allow to rerun


author: Gonchik Tsymzhitov
body: Hi!

Please, check here the suggestion in the comment

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

Cheers,

Gonchik Tsymzhitov


Tags: rollback

deployment
Idle Agent Shutdown Delay
Asked by Naveen kumar Mettu:

Idle Agent Shutdown Delay
> Specify the number of minutes that an elastic agent must be idle before Bamboo shuts down the elastic instance running that agent.  
> ![(info)](https://confluence.atlassian.com/s/en_GB/7202/e97769bbf919c0bd667762fc102f557beacb7f94/_/images/icons/emoticons/information.png) *++**Elastic instances running in the Amazon EC2 compute cloud are charged in hourly blocks from the time they are started.**++ To maximize usage of elastic instances in a cost-effective manner, Bamboo only performs these checks just prior to the expiry of each hourly block.*

Here it's mentioned instances running in Amazon EC2 charged hourly, but recently all Linux ec2 instances are being charged on a ++***Seconds***++ basis. So the above-mentioned statement still holds?


Answers:
author: Jeremy Owen
body: Hey Naveen,

Bamboo 6.3 and above support Per-second billing. Here's the feature request that was implemented for your reference:

* [Elastic Bamboo should take new per-second billing into account](https://jira.atlassian.com/browse/BAM-18688)

It's configurable per Image Configuration at **Bamboo Administration \>\> (Elastic Bamboo) Image Configurations \>\> Edit.**

When **Per-second billing** is enabled, the Automatic Elastic Management feature will shutdown the any Elastic Agent utilizing that image config as soon as the Idle agent shutdown delay threshold is reached rather than waiting till the end of the hourly block.

We'll make sure the docs are updated accordingly. Thank you so much for pointing that out.

Hope this helps. :)

Cheers,

Jeremy
JMS port closes on Bamboo Server docker container
Asked by Damian Fedeczko:

Hello all,

Recently I encountered an issue with my Bamboo Server instance running in a Docker container based on Red Hat. From time to time, the JMS port 54663 on the Bamboo Server closes by itself and the Bamboo Remote Agents are unable to connect to the Server. A simple systemctl restart docker helps, but I need to find the root cause. Any ideas? Suggestions what to check?

Thank you very much in advance!


Answers:
author: Gonchik Tsymzhitov
body: Hi!

I hope the latest version 6.8.0 will fix your request

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

Cheers,

Gonchik Tsymzhitov


Tags: docker
specific task in job need to run on branch plan but all the task need to be run on main plan branch
Asked by Sai Reddy:

Hello Team,

I have some requirement like below.

I have 5 tasks in one job. I have a branch plan configured. I would like to run only 4 tasks in the branch plan, basically, I don't want to run one specific task(version increment tasks) during branch plan build.

how can I achieve this using bamboo?

Our configuration here is --\> Once the pull request is approved feature branch code merged to Gated CI branch. the build will be triggered on gated CI branch if build success it will merge to master branch.

in gated CI branch, I don't want to run a specific task related to version increment (to avoid tow increments for one commit).

Thanks,

Sai


Answers:
author: Gonchik Tsymzhitov
body: Hi!

What about set condition on extra task ?

Cheers,

Gonchik Tsymzhitov
How do I delete Artifact Definitions?
Asked by Roger Mier:

I made a job to build some code on a remote Windows Agent, scoop up the artifacts, and now I'm trying to make the Deploy job. In the process of making the SCP portion of my Deploy job, I discovered that SCP is unable to copy the artifacts, likely due to it using wildcards which SCP doesn't support.

So, to remedy this issue, I've created another task which zips up the artifacts so that just one file can be copied to the destination. However, I find that I can't delete the old artifact definitions which I no longer need. It tells me that if I delete them my deploy job might stop working (it never worked in the first place). The window gives me a Delete and Cancel option, but the Delete button doesn't work.

I've tried everything short of deleting my Deploy job, all the tasks in there are disabled, and I even deleted the task to DL the artifacts. Still I can't delete the Artifact Definitions. I would delete the whole Deploy env, but I hate the thought of having to re-create it.

I'm very frustrated by this, any help would be appreciated.


Answers:
author: Roger Mier
body: I managed to answer my own question. To successfully delete these, I had to first make them not Shared. After accepting the warning that they were in use by the build job, I was able to delete them.
Changing umask for Remote bamboo agents
Asked by John Tracy:

My dev team would like to change the umask under which the bamboo agents run so that people building plans can access their files after they have finished. The default is 022 and we need 002. Simply setting the umask in the bamboo-agent.sh script does not work.


Answers:
author: Anonymous Coward
body: Simon says:

"

You can override the default system wide umask value in the profile of each user. For example you can add the line:

umask 002

at the bottom of the .profile configuration file that is located in the home of the user that runs the remote agent. (Don't forget to start a new session after making the change or source the file in a new shell). Depending on which shell the user is using you may have to set the value in a different file. (For bash you can set it either in \~/.profile or \~/.bashrc. Note that the tilde means the home of the user that runs the agent).

"

Simon out

comments: author: John Tracy
body: I have already tried this. I attempted to modify /etc/bashrc and /etc/profile as well without any luck.


Tags: agent

permission

remote
Bamboo repository spec changes executed but no plans updated
Asked by Michael Stone:

Hi, I'm setting up repository specs from Bamboo but having difficult getting changes to apply. This is the result so far:

* Specs are checked in to my project repo under a bamboo-spec folder
* Webhook set up from my Github repo, and events are successful publishing to Bamboo endpoint
* Enabled BambooSpecs in my Linked Repository
* Enabled Repository Stored Specs in the global security settings config
* Added the repository as a Bamboo spec repository from my Project Settings
* Checked that my Build Project is listed under the BambooSpec tab of my Linked Repository
* After triggered by a check in, the Spec Status result in the Linked Repository reports spec execution successful
* When I run "mvn -Ppublish-specs" locally from the same code, the plan is successfully updated on the same Bamboo server

I can't seem to get the plan to update automatically as the result of the check-in -\> webhook flow though.

Tech details:

* Atlassian Bamboo version 6.5.0 build 60509
* bamboo-spec-runner 6.5.0


Answers:
author: Jeyanthan I
body: Usually when you do not see the plan triggering Specs, the respective bamboo logs should hint us what the problem is. Check your *\<bamboo-install\>/logs/catalina.out* or \<*bamboo-home\>/logs/atlassian-bamboo.log* and see if you get a hint.

Cheers,  
Jey

comments: author: Michael Stone
body: Hi Jey,

There doesn't appear to be any relevant server logs in the install dir, and the only thing that looks relevant in the bamboo-home logs is this:  

2018-09-06 08:56:35,437 INFO \[14-repository-stored-specs:pool-22-thread-1\] \[RepositoryStoredSpecsServiceImpl\] Bamboo Specs execution took 7.690 s  
2018-09-06 08:56:35,523 INFO \[15-BAM::SpecsDetection:pool-23-thread-3\] \[RepositoryStoredSpecsServiceImpl\] Bamboo Specs import took 85.68 ms

Thanks,

Michael


author: Jeyanthan I
body: From your comment, it looks like Bamboo Specs execution took place, which is good. However, the subsequent entries in the same log should tell us if the maven build failed after the import. Sometimes, it fails due to the permission in the system like mentioned in [this thread](https://community.atlassian.com/t5/Bamboo-questions/bamboo-specs-automatically-running-with-permission-denied/qaq-p/845407).


author: Michael Stone
body: There just doesn't seem to be any other errors in the logs, or anything else that relates to plan updates.


author: Jeyanthan I
body: Do you still experience this issue?

We can create a support ticket for you if so to investigate further.

Cheers,  
Jey


Tags: spec