youngmon/atlassian-qna huggingface dataset:
How to import Jenkins job into bamboo
Asked by Anil Kumar:

Is there any way to import Jenkins job to Bamboo, only configurations.


Answers:
author: Steffen Opel _Utoolity_
body: Yes, [Importing data from Jenkins](https://confluence.atlassian.com/bamboo/importing-data-from-jenkins-317949257.html) is a built-in Bamboo feature, though obviously not all of the myriad of Jenkins plugins and features can be migrated to Bamboo as is, see the matrix on the referenced page for an overview. That being said, the process is well guided and produces an import log with possible configuration issues, so you might just want to give it a try and see how it goes.
Is there a way to trigger the jenkins job after the bamboo plan is complete ?
Asked by Anil Kumar:

We are using bamboo to deploy the latest build to our application and jenkins has our automation suites.I want to start my automation suite after the new build is deployed.


Answers:
author: Steffen Opel _Utoolity_
body: The easiest way to achieve this would probably be the Jenkins [Generic Webhook Trigger Plugin](https://wiki.jenkins.io/display/JENKINS/Generic+Webhook+Trigger+Plugin).

Once you have configured an inbound webhook trigger in Jenkins, you need to invoke it somehow. As is, the various curl based examples there could all be executed via Bamboo's [Script task](https://confluence.atlassian.com/bamboo/script-289277046.html).

If you are wondering why a webhook is not yet amongst the supported Bamboo [notification recipient types](https://confluence.atlassian.com/bamboo/configuring-notifications-for-a-plan-and-its-jobs-289276973.html), you are not alone - please watch and vote for the following issue to further increase Atlassian's priority for this long missing and highly requested feature:

* [Webhook notification type (BAM-14321)](https://jira.atlassian.com/browse/BAM-14321)

**Workaround**

If you happen to use AWS, you could also work around the missing webhook notification type via the flexible [Automate with AWS notification recipient](https://utoolity.atlassian.net/wiki/spaces/UAAWS/pages/104529932/Using+the+Automate+with+AWS+notification+recipient+in+Bamboo) in our (commercial) [Automation with AWS (Bamboo)](https://marketplace.atlassian.com/apps/1216064/automation-with-aws-bamboo) app, which offers various remote actions such as [Invoke Lambda Function](https://utoolity.atlassian.net/wiki/spaces/UAAWS/pages/104530443/Invoke+Lambda+Function), which could then trigger the Jenkins webhook in turn.

* In case I recommend to store the secret token for the webhook invocation in the [Systems Manager Parameter Store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-paramstore.html) and [reference](https://docs.aws.amazon.com/systems-manager/latest/userguide/integration-ps-secretsmanager.html) it from the lambda function at runtime).
* **Disclaimer**: I'm a co-founder of this app's vendor Utoolity.


Tags: jenkins
Plan permissions inheritance
Asked by omar rey x ramos:

Why is it every time I create a new plan, my user account has the default plan permission and not using the group I setup in the project Plan permissions inheritance?


Answers:
author: Foong
body: Project Plan permissions inheritance setting isn't going to be shown in the Plan Configuration side.

Project Plan permissions inheritance setting is an additional permission for all the plans inside the Project. Even though this setting isn't shown in the Plan level, it will still take effect.
> my user account has the default plan permission

Since you are the creator of the plan, your account will be configured as the Admin.
How do I get Bamboo to call a remote host to invoke an ansbile playbook?
Asked by Michael Ellis:

Would like to have Bamboo call an Ansible master server to run playbooks from the Ansible master server based on builds in Bamboo. I have seen someone say do it via the SSH Task in Bamboo.


Answers:
author: Marty
body: Hi Michael,

you could try creating a script task to do this: [https://confluence.atlassian.com/bamboo/script-289277046.html](https://confluence.atlassian.com/bamboo/script-289277046.html?)

I hope that helps!
Getting started with Elixir and Bamboo
Asked by Pedro Martins:

We use Elixir at our work (a language that compiles to Erlang which runs on the BEAM VM) and we are looking at several CI tools.

One of the tools we are considering is Jira Bamboo, but I was unable to find any guides or any material stating support for Elixir (or Erlang for that matter).

How can we integrate Elixir (or other languages using the BEAM VM) with Jira bamboo?

Do we have to use Docker?


Answers:
author: Daniel Santos
body: Hi [@Pedro Martins](/t5/user/viewprofilepage/user-id/2702404)

I can talk about the Bamboo side of things. You can use Bamboo to automate any building environment, the only difference is that for some of them like JAVA we already have some tasks (as wrappers) to simplify your life. In your case, you will need to use script tasks to call your builders and external tools to get your work done.

You can use most of the OS types to build your application (OSX, Linux, Windows,...) priorly prepared with your tools. Or you can also use Docker containers too. The main advantage of using Docker containers is that you can have a very clean, replicable and versioned environment.

I strongly suggest you check this video [Getting Started with Atlassian Bamboo - Build Structure Deep-Dive](https://www.youtube.com/watch?v=2IRTnbzk0RQ), installing Bamboo as a trial and sharing your questions have when testing it.  

Each CI environment is different and relies on your company process so it is better if you know how the tool works and then how to build the process you need with the tool.


Tags: elixir

erlang
How to make trigger conditions branch friendly ?
Asked by Zein Makki:

Hello,

Scenario: We have a main bamboo plan (Source Build) that runs the source code build. We create a branch out of that. We have other long running integration tests that also have branches configured. This looks like the following:

* Source Build (master)
  * Source Build (Branch A)
* Feature A (master)
  * Feature A (Branch A)
* Feature B (master)
  * Feature B (Branch A)

We have scheduled triggers to run the integration tests multiple times a day. Now we chose the trigger condition to **Only run Build if other Plans are currently passing** and provided the plan key for plan *(Source Build)*.

Now, it makes sense for *Feature B (Branch A)* to get triggered only if *Source Build (Branch A)* is passing successfully which is not the case. It seems that this trigger condition only checks for *Source Build (master).*

Is this by design ? What is the rational behind this ? And is there any way to achieve the described behavior ?


Answers:
author: Gonchik Tsymzhitov
body: Hi!

I have read your question, I can only suggest you try use this one (child plan)

<https://confluence.atlassian.com/bamboo/setting-up-plan-build-dependencies-289276887.html>

or write in plan as final stages some automatisation based on rest api call <https://docs.atlassian.com/atlassian-bamboo/REST/latest>

Cheers,

Gonchik Tsymzhitov

comments: author: Zein Makki
body: Thank you for your kind response Gonchik.

The desired behavior is to have the branch plans run on schedule except if the Source Build plan branch is currently failing. If my understanding of child plans is correct, then it triggers plans in hierarchy mode one after the other which doesn't generate the same behavior (ability to run the plan every 1 hour for example in case the Source Build plan is successful). The intended behavior works perfectly in non-branched plans. Is there a place where I can ask if this is by design or maybe I need to submit a feature request/bug report ? (I know it is tricky to match branch plans by name in multi-branch environment)

How does the second approach help in this situation ? If I added some task to identify failing vs succeeding plans, then do I need to check for that thing in all the others plans as a first task ? Can you kindly elaborate on that second point.


author: Gonchik Tsymzhitov
body: I have not found the related issue, btw. you can try to find as well on this resource

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

Cheers,

Gonchik


author: Zein Makki
body: The weird thing is that child plans respect the branch hierarchy. If we add a dependency of plan B to plan A. Then when branch of plan A completes it triggers same branch name of plan B. So it seems the functionality exists, but not sure why it doesn't work for scheduled triggers.

Can I open a bug in Jira.Atlassian for that ?


author: Gonchik Tsymzhitov
body: Hi!

Let's start from support.atlassian.com
Bamboo failing to trigger on repository commits
Asked by Thomas Hood:

Hey,

We have a local Bitbucket and Bamboo server running on the same machine. We have our main trunk repo linked between the two. Up until a week ago when we would push a commit to master on our main repo it would trigger a build with no issue. Now it seems all triggers have stopped working. Are there any common things to check for this?

Thanks,

Thomas


Answers:
author: Thomas Hood
body: Ended up restarting bitbucket+bamboo services and it was fine
My Bamboo Plan Stage2 runs before Stage1 when I trigger the build, how to change that?
Asked by vishnuvardhan vangala:

Hi,

I created a bamboo plan and I had Stage1 and Stage2 under that.

FYI.. Stage1 has its own tasks in correct order and Stage 2 has its own tasks.

When I trigger the build, Stage2 is getting started immediately. Not sure why this is happening? Is there any possibility to fix this?

Moreover this is not happening all the times, During my nightly build it works perfect. When I trigger manually, Stage2 is getting started sometimes.

Request for an early help.


Answers:
author: Gonchik Tsymzhitov
body: Hi!

looks like you setup multiple one

<https://confluence.atlassian.com/bamboo/using-stages-in-a-plan-289276862.html>

Shortly, you can workaround it by final stage :)

Cheers,

Gonchik Tsymzhitov
how to handle the deleted files in continuous deployment scenario
Asked by vijay gowda:

I am using a product where in the deployment needs to happen in a particular directory of unix, which not only contains the source archived in bit bucket but also contains some dynamic files which should not be touched during the deployment and hence cannot delete the whole diretory and redeploy using untar command.

I am using unix server where the files are deployed using a untar command.

eg. **tar -xvf cust.tar**

I am stuck in the below scenario.

eg)

Step1 ) Bit bucket branch contains version1

**a.sh (ver1)**

**b.sh (ver1)**

**c.sh (ver1)**

deployment from bitbucket happened, the 3 files got deployed in the server using untar command tar -xvf \<tarfilename\>

**a.sh (ver1)**

**b.sh (ver1)**

**c.sh (ver1)**

**step2)**

Bit bucket branch contains version2

**a.sh (got deleted)**

**b.sh (ver2)**

**c.sh (ver2)**

**deployment from bitbucket happened, the 2 files got deployed in the server using untar command tar -xvf \<tarfilename\>. The deployment server contains the below file after using the untar command**

**a.sh (ver1) (contains the file from the previous deployment, which is not needed now)**

**b.sh (ver2)**

**c.sh (ver2)**

**Problem statement :- after the deployment in step2, I would require a handle to know the deleted file in the branch.**

**I have tried mutiple option like**

git whatchanged

git log --diff-filter=D --summary \| grep deleted (this command give the entire list of master branch as well, I am looking for the file deleted only in that particular branch).

Request help regarding the same. I am using Bamboo for CI and CD.

Regards

Vijay


Answers:
author: Gonchik Tsymzhitov
body: Hi!

Have you using task clean working directory for every start or finish of your plan?

Also, for handling you can set is as artifact, then fetch from previous run by rest api.

Cheers,

Gonchik Tsymzhitov

comments: author: vijay
body: Hi [Gonchik Tsymzhitov](https://community.atlassian.com/t5/user/viewprofilepage/user-id/726117) ,

Sorry for the delayed response, no we are not using the clean working directory as, the directory contains some of the files which is not in source versioning and hence cannot have the clean working directory.

We are using bit bucket for our source versioning.

Regards

Vijay


Tags: bitbucket
Having server capability for Maven when we install Bamboo server as docker container (version 6.8.0)
Asked by Deepali W:

Is it possible to have Maven server capability by default added as part of docker container when we install Bamboo as docker container.

Currently I have to add Maven executable explicitly in Bamboo Administration page so as to be available for Maven task creation. Can we automate this?

I am creating Project, Plan and Jobs using its Java Spec. So I need Maven executable to be available already on server OR Can I create capability using Bamboo's Java Spec?

I do not want to login to Bamboo server and create executable manually.

PS: dockerfile of bamboo-server mentions below but this is not automatically detecting Maven version and now showing in drop down of Executable by default :

#create symlink to automate capability detection

RUN ln -s /usr/share/maven /usr/share/maven3


Answers:
author: Gonchik Tsymzhitov
body: Hi!

Are using the isolated Bamboo process for Docker containers

<https://confluence.atlassian.com/bamboo/repository-stored-bamboo-specs-security-938844473.html>

Cheers,

Gonchik Tsymzhitov

comments: author: Deepali W
body: Thanks for answer. But how this link will be helpful in my case? I have Bamboo server installed as a docker container. Question is how can I have Maven as server capability (Executable) automatically added as part of installation or can this be added programatically using Java Spec and not manually? Is it possible?


Tags: maven
Jira Issues and Live Activity log not loading
Asked by schow-lmi3d:

When I start a build for a plan, the plan build page that summarizes the running build does not display the jira issue or live activity log information.  

The live log is visible if I go into the job summary level.  

Is this a bug?  

I'm running "[Atlassian Bamboo](http://www.atlassian.com/software/bamboo/) version 6.6.2 build 60606 - 14 Aug 18"

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


Answers:
author: Foong
body: Is there a proxy server in front of Bamboo? If yes, is the following settings added into Bamboo **server.xml** file and then restart Bamboo?

```
secure="true"
scheme="https"
proxyName="mycompany.com" 
proxyPort="443"
```

[Securing Bamboo with Apache using SSL](https://confluence.atlassian.com/bamboo/securing-bamboo-with-apache-using-ssl-391087437.html)


author: Gonchik Tsymzhitov
body: Hi!

I suggest to check connectivity between Jira and Bamboo.

Then double check applications links. <https://confluence.atlassian.com/bamboo/integrating-bamboo-with-jira-applications-289276945.html>

Hope it helps

Cheers,

Gonchik Tsymzhitov

comments: author: schow-lmi3d
body: Yeah, I checked the application link and it seems to be up. No errors on the application link config page.
plan branches
Asked by Matthew Kahane:

the gui screen captures on the plan branches page under gatekeeper and branch updater seem to be confused:

<https://confluence.atlassian.com/bamboo/using-plan-branches-289276872.html>

The bubble charts are correct but the gui captures seem to be wrong.

Under branch updater, the bubble chart appears to checkout the feature, merge from the master and then push to the feature, however the screen cap shows the opposite.

Under gatekeeper, the bubble chart appears to checkout master, merge the feature, then push back to master, but the screen cap shows the opposite.

This topic is confusing enough as it is. Please at least get the documentation right.


Answers:
author: Foong
body: The GUI images are using example when "master" is created as branch plan. It is confusing cause the GUI example is different compared to the bubble chart.

It will be fixed.


author: Gonchik Tsymzhitov
body: Hi [@Matthew Kahane](/t5/user/viewprofilepage/user-id/2681673),

Could you provide the version of your Bamboo ?

Is it latest version? Or old one?

Cheers,

Gonchik Tsymzhitov

comments: author: Matthew Kahane
body: Gonchik, I'm not sure why my version is relevant.

I provided a link to a page that I think has bad documentation. Can you confirm that the documentation is wrong?
Password pattern matchig in logs
Asked by Richie Rees:

How does the password log obviscation work, does this simply mask anything that uses the variable name, or does it mask anything that has the value of the password ?


Answers:
author: Steffen Opel _Utoolity_
body: The Bamboo password log obfuscation indeed masks anything that has the value of any password variable in the executing build/deployment context, which can have confusing effects for simple 'password' values that by chance occur elsewhere in the log as well, for example:

Say you have a global variable ${bamboo.defaultAdminPassword} with a value of 'admin' so that you can automate logging into Atlassian products started with the SDK's [atlas-run-standalone](https://developer.atlassian.com/server/framework/atlassian-sdk/atlas-run-standalone/) command via the Bamboo [Script task](https://confluence.atlassian.com/bamboo/script-289277046.html).

Using that password variable directly (e.g. for a REST API call) will properly yield a value masked with '\*\*\*\*\*\*\*\*' in the log. However, if you also put an 'echo "Logging in as administrator ..."' command on top of the script, you will get a log output of "Logging in as \*\*\*\*\*\*\*\*istrator ...".  

Put another way, anywhere the phrase 'admin' is contained in a log line, it will be masked as '\*\*\*\*\*\*\*\*' because it happens to also be the value of a password variable.

From a technical perspective this is implemented via [class PasswordMaskingLogMutator](https://docs.atlassian.com/atlassian-bamboo/6.8.0/com/atlassian/bamboo/build/logger/interceptors/PasswordMaskingLogMutator.html), which uses [class PasswordMaskingUtils](https://docs.atlassian.com/atlassian-bamboo/6.8.0/com/atlassian/bamboo/util/PasswordMaskingUtils.html) in turn. If you are curious and a licensee you can [access the Bamboo source code](https://www.atlassian.com/licensing/purchase-licensing#customizationsandprofessionalservices-1) to see exactly how this works.


author: Gonchik Tsymzhitov
body: Hi!

As I see yes,

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

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

In our instance we just set variable with name something.password

Hope it helps

Cheers,

Gonchik Tsymzhitov
How to setup an Inline Python script
Asked by Shannon Pisone:

I am new to Bamboo. I setup my Plan and want to use a Task Script to use my python code inline. I am using this against a Windows agent. I am using the Shell interpreter and also tried the /bin/sh interpreter.

I can run windows commands inline in my plan using cmd.exe fine, just not Python

Every time I run this, it errors with something like the following:

'import' is not recognized as an internal or external command, operable program or batch file.

What is the best way to run python code as inline in Bamboo? I am using version 6.2.3 build 60210 - 20 Nov 17

Thanks


Answers:
author: Chris Berry
body: Hi Shannon,

Welcome to the community. You can run python using the Shell interpreter and specifying the python path as the first line of the inline script.

eg.

#!c:/pathtopython/python.exe

print('hello world')

credits()

cheers

Chris

Atlassian support- Bamboo


author: Gonchik Tsymzhitov
body: Hi!

I am doing like this.

1. Push into Bitbucket repo my python code.

Bamboo tasks

2. Git pull or git clone on related Bamboo node

3. Bamboo Task which run the python and file

Hope it helps

Cheers,

Gonchik Tsymzhitov

comments: author: Shannon Pisone
body: Thanks. I am able to run my python script as a file...like you mentioned.

Just wondering why I cannot run the same python code as inline instead of a file.

I came over from Jenkins....and it seems a little more user friendly than Bamboo so far.


author: Yaswanth Attuluri
body: Hi Shannon, if possible could you please elaborate how did you run your python script as a file. I am using SVN server and i am new to bamboo.
Bamboo Demo
Asked by Jharna Dutta:

Need to create a demo using bamboo tool e2estarting from source code ..deploying, building andtesting..using bamboo and eclipse in windows 64 bit...

please share some already done demo steps.


Answers:
author: Gonchik Tsymzhitov
body: Hi!

I hope those video tutorials will help you :)

[https://www.youtube.com/watch?v=fZkfhN1_YgE\&list=PLaD4FvsFdarQp-qHSr3EqWz1WLFa-HUeD](https://www.youtube.com/watch?v=fZkfhN1_YgE&list=PLaD4FvsFdarQp-qHSr3EqWz1WLFa-HUeD)

And docs :)

<https://confluence.atlassian.com/bamboo>

Cheers,

Gonchik Tsymzhitov
Wrong file permissions when bamboo job checkout
Asked by avner_xvtec:

Hi,

I have a plan in bamboo - and the first task is to check out a repository.

(the git server is bitbucket server)

When I checkout manually, and when the bamboo does the checkout I get different file permissions:

Manual:

drwxrwxr**-x** 8 bamboo bamboo 4096 Feb 6 14:57 rootfs

Bamboo:

**drwxr-x---** 8 bamboo bamboo 4096 Feb 6 15:01 rootfs

What is going on there? I need the bamboo to checkout with the same permissions

Thanks

Avner


Answers:
author: Foong
body: The latest Bamboo have a setting that affect the file permission.

Edit the file **\<bamboo-install\>/bin/catalina.sh** for the following line to change the permission:

```
# Set UMASK unless it has been overridden
if [ -z "$UMASK" ]; then
 UMASK="0027"
fi
umask $UMASK

```

Bamboo have to be restarted after the modification.

comments: author: avner_xvtec
body: Thanks!


author: jredmond
body: Git only tracks the executable bit and the file type in a file mode - it doesn't track ownership or the read or write bits, so those parts are left to the client to determine. You'll need to ask this in the Bamboo section.

comments: author: avner_xvtec
body: Thanks

1. There are differences also in executable attributes

2. So if so, why is the differences between the bamboo does the cloning and when I am doing it (in the same path)

Avner


Tags: bitbucket

bitbucket-server

server
How do I reset build plan average duration?
Asked by Jorge Suarez:

I am having to run builds multiple times to debug a few jobs. This results in the first several runs being very short. Later when I get everything working, running a job shows Builds is taking xxxx seconds/minutes longer than usual. How can I reset the average duration timer?


Answers:
author: Gonchik Tsymzhitov
body: Hi [@Jorge Suarez](/t5/user/viewprofilepage/user-id/1157752),

Just interesting what is the use case?

In fact, the duration in short time will be normalized

Cheers,

Gonchik Tsymzhitov

comments: author: Jorge Suarez
body: Hi [@Gonchik Tsymzhitov](/t5/user/viewprofilepage/user-id/726117),

As I said, setting up a build plan is an iterative process and those initial short runs only take a few seconds. If I have to run it 20x to get some scripts right, I would like to get an accurate time for real builds.

Actual use case - accurately determine if I should go get coffee or take a break while waiting for build to complete.

Theoretically, I could just create a debug plan and when it's right clone the entire plan so it starts from 0 again, but as many programmers I am lazy and expect features that give me complete control. Also, it becomes inaccurate again when we add a new stage like deploy to server instead of upload to repo (I know now there are Deploy plans for this).

As for normalization, if we have a daily build, it could more than a month to normalize, and also anytime someone breaks the build, if running through those takes a few cycles, it will make it deviate again.


author: Nic Wainwright
body: Also interested, but in a converse method. My initial run, or runs after purging my docker container, take wayyyyyyy longer (10x or more) than my standard builds. Would also love to see how to reset the avg timer