youngmon/atlassian-qna huggingface dataset:
Bamboo Specs Multiple Project and Plans Structure and Reusability Use Cases
Asked by Brundaban Mohapatra:

Hi Team,

Is there any use case or an example of handling multiple projects with multiple plans and a deployment strategy for Bamboo Specs. I have gone through the docs and example for specs. But it does not give the visibility or approach to understand how Atlassian expects the Bamboo Projects and Plan (Multiple) to handled using specs. It would be great to have an example for customers so that they are in proper standard path in their future strategy.

Regards,

Bru


Answers:
author: Alexey Chystoprudov
body: Every team is unique and use Bamboo in any possible way. I can say about Bamboo dev team approach.

We have separate repository which holds all our plans/deployments in Java code. There're utility classes to hold generic tasks like Maven, test parsers, Docker etc. And then we have main entry class

```
@BambooSpec
public class PlanUploader {
   
    @NotNull
    public static Project defaultProject() {
        return Projects.mainProject();
    }

    @NotNull
    private static List<BambooPlan> getPlans() {
        return Arrays.asList(
                // A plans
                new CoreBuildsPlan(),
               ...
        );
    }

    @NotNull
    private static List<BambooDeployment> getDeployments() {
        return Arrays.asList(
                ...
                new BambooReleaseDeployment()
        );
    }
    
    public static void main(String[] args) {
        publishAll(Servers.bambooTeamServer(), getPlans(), getDeployments());
    }

    private static void publishAll(@NotNull BambooServer bambooServer, @NotNull List<BambooPlan> plans, @NotNull List<BambooDeployment> deployments) {
        final List<RootEntityPropertiesBuilder<?>> entities = new ArrayList<>();
        plans.forEach(bambooPlan -> entities.add(bambooPlan.getPlan()));
        deployments.forEach(bambooDeployment -> {
            entities.add(bambooDeployment.getDeployment());
            entities.addAll(bambooDeployment.getEnvironmentPermissions());
        });
        entities.forEach(entity -> publish(bambooServer, entity));
    }

    private static void publish(@NotNull BambooServer bambooServer, @NotNull RootEntityPropertiesBuilder builder) {
        System.out.println(bambooServer.publish(builder));
    }
}
```

```
?
```


Tags: spec
bower is not recognized as an internal or external command, operable program or batch file
Asked by Tonya_Green:

My bamboo jobs fail with the following....

"'bower' is not recognized as an internal or external command, operable program or batch file' " This should be so easy.

Coming from a site recovery, I have an issue with Bower configuration. After running an npm install bower -g (global), the agent still can't find it.

I added the (bamboo agent) user directory "AppData\\roaming\\npm to the system path as the last resort which I will reboot the server after business hours for path change to take effect.

Any other ideas?


Answers:
author: Jimmy Seddon
body: Hi Tonya,

My first recommendation would be to eliminate Bamboo from the equation and make sure that you can run a bower command such as checking the version from a command prompt/terminal on the server.

If that works, the next step would be to look at the build plan itself. What type of task is it failing on? If it's a script task, what type of shell is it trying to run the script in? If it's an NPM task is the correct npm executable path being loaded?

![NodeEXE.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/52470i691A863E9492D982/image-size/large?v=v2&px=999 "NodeEXE.JPG")

You can define Agent specific paths for the location of executables, I've run into this in the past when setting up a new remote machine where the person who installed everything didn't do so in the same location that we use elsewhere so I needed to provide an agent specific path for the same executable.

Just some thoughts.

Hope that helps!

-James

comments: author: Tonya_Green
body: We are running a script task which executes "bower install" under the build working directory of the build src.

It yields error.

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

I will reboot tonight to see if the path addition to the path variable resolves the issue. Let me know if you any other ideas.


author: Tonya_Green
body: shell inline script task we are using.


author: Tonya_Green
body: After adding the path locations of bower executable and rebooting, the agent was able to run bower jobs successfully. Thanks so much.


author: Jimmy Seddon
body: Awesome! Glad you were able to sort out the problem!


author: Jimmy Seddon
body: Awesome!

Glad you were able to sort out the problem!
Elastic Bamboo AWS Security group rules
Asked by james.scanlon:

Greetings Atlassian Gurus!

I have a (hopefully simple) question re: the elasticbamboo AWS security group created by Elastic bamboo.

Elastic bamboo creates the security group by default with port TPC22 and TCP port 26224 from the internet. [per this article](https://confluence.atlassian.com/bamboo/elastic-bamboo-security-289277195.html)

Is the SSH inbound required as part of the elastic bamboo service or can this be locked down to 'known ips'?

Is port 26224 required to be opened to the internet or can it be further locked down to 'known ips'?

Many thanks!


Answers:
author: Daniel Santos
body: Hi [@james.scanlon](/t5/user/viewprofilepage/user-id/3028022)

I see you are new here.  
Welcome to Atlassian Community!

Let me work on your questions:
> Is the SSH inbound required as part of the elastic bamboo service or can this be locked down to 'known ips'?

It can be locked down to specific IPs. In fact, this port is not used by Bamboo, but available to allow you to SSH your instance if necessary.
> Is port 26224 required to be opened to the internet or can it be further locked down to 'known ips'?

This port is required to allow Bamboo communication with the elastic agent. You need to make sure that the IP (representing Bamboo to the internet) is allowed to connect with that port.

I hope I could answer your questions.


Tags: aws

firewall

port

security
Bamboo maven task is failing when I add -Dsome_variable=${bamboo.variable} into maven goal field
Asked by Marcos Fernandez:

Dear all,

I am trying to inject into the maven build a variable value according to Bamboo information:

*You can then specify the following in the **Goal** field of your build plan:*

    clean package -DbambooBuildNumber=${bamboo.buildNumber}

Unfortunatelly Bamboo maven task is failing when I add any Bamboo variable using -Dsome_variable=${bamboo.variable} into the maven goal field. If I replace ${bamboo.variable} for any other value it works fine. The build log says:

```
[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
```

nevertheless the log says previously :

```
Substituting variable: ${bamboo.variable} with Some Value
```

Could you please tell me why is not working ?

thanks


Answers:
author: Steffen Opel _Utoolity_
body: Not 100% positive on this one, but the Maven command line is sensitive to formatting/parsing issues in general, and for property definitions in particular (also depends on OS and shell of course), so I'm usually enclosing them in quotes as soon as I encounter a problem, e.g.:

    clean package -D"bambooBuildNumber=${bamboo.buildNumber}"

This usually addresses the problem for me, have you tried that already?

comments: author: Marcos Fernandez
body: Hi Steffen,

thanks for you help! It worked fine :) I didn?t try that option.

Regards.
Is it possible to change plans in Bamboo via Bamboo Specs?
Asked by Andres Delfino:

I'm reading about Bamboo Specs, but it seems it is useful to create plans from scratch only. Can it be used to modify already existing plans too?


Answers:
author: Jimmy Seddon
body: Hi [@Andres Delfino](/t5/user/viewprofilepage/user-id/2469244)

I Have been using specs to both create new and update existing for a number of months now without any issues. So yes you can use specs for both.

Hope that helps!

-James

comments: author: Andres Delfino
body: Hi, James! Thank you for your reply!

Awesome, I'll give it a try :)


author: Jimmy Seddon
body: Hi Andres,

Just to give you a bit more of a staring point when you are editing an existing plan you can use the action menu to display your current build plan as java specs, that should give you a good starting point to make updates:

![ViewPlanAsSpecs.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/52314iF7E8963F305226AE/image-size/large?v=v2&px=999 "ViewPlanAsSpecs.JPG")


author: Andres Delfino
body: Thanks for all your help, James!!


Tags: spec
Failed to execute plugin 'Cucumber Artifact Copier'
Asked by Cdnyoung:

Hello,  
I have a bamboo job executing automated tests on physical android devices. After the test run, even when the tests pass, the job is still failing with the error in the title. THe logs don't give any information besides this, and I haven't had success with finding an answer here or online.   
Does anyone know how to troubleshoot this? Let me know if there's more information you need. Thanks!

Here is the full error:  

|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Failed to execute plugin 'Cucumber Artifact Copier' with error: com.atlassian.bamboo.v2.build.BuildContext.getRuntimeTaskContext()Lcom/atlassian/bamboo/task/RuntimeTaskContext; |


Answers:
author: Alexey Chystoprudov
body: Is tracked at <https://bitbucket.org/vikasborse/cucumber-for-bamboo/issues/12/failed-to-execute-plugin-cucumber-artifact>

comments: author: VikasB
body: Please try the version 3.4 with fixed error. <https://marketplace.atlassian.com/download/apps/1214740/version/121>


Tags: addon-com.mdb.plugins.cucumberforbamboo

jira
I cannot check out submodules using SSH in Windows
Asked by Jack Zylkin:

Bamboo is able to talk to my Bitbucket server and clone the main repository using the automatically generated SSH key (shown under "advanced settings")

However, after adding this same public key to the various submodules in bitbucket, and to the top-level project as well, but Bamboo still tells me it does not have permission to access the submodules during checkout.

I have also tried setting my HOME variable to C:\\atlassian\\bamboo-home and putting an id_rsa key pair I generated myself into C:\\atlassian\\bamboo-home\\.ssh

I have also tried putting them in various USERPROFILE folders, including the admin user profile which is at C:\\Windows\\system32\\config

I have also tried explicity pointing GIT_SSH_COMMAND to "ssh -i C:\\atlassian\\bamboo-home\\.ssh\\id_rsa"

Nothing works.

The only thing that works for me is to check out the submodules using a separate script task that runs after the main repository checkout is complete. In this script, I explicitly load my own keys using OpenSSH.

Where does Bamboo get its SSH keys for submodule checkout? Why isn't it using the same key it used for the main repository?

\`\`\`

|----------------------|-----------------------------------------------------------------|
| 19-Apr-2019 18:53:50 | git@bitbucket.\<mycompany\>.com: Permission denied (publickey). |
| 19-Apr-2019 18:53:50 | fatal: Could not read from remote repository.                   |
| 19-Apr-2019 18:53:50 |                                                                 |
| 19-Apr-2019 18:53:50 | Please make sure you have the correct access rights             |
| 19-Apr-2019 18:53:50 | and the repository exists.                                      |


Answers:
author: Victor Debone
body: Hello [@Jack Zylkin](/t5/user/viewprofilepage/user-id/2540673) :)

Bamboo uses a proxy internally to handle Git repositories. In your case, you seem to be getting troubles with the submodules authentication coming from the **same Bitbucket server,** correct?

If that's is true, do you have the submodules repositories configured with absolute url? Could you try with relative urls?

Did that help you?

Victor

comments: author: Jack Zylkin
body: I do have them configured with absolute URLs. I did not realize you could make them relative.


author: Jack Zylkin
body: And yes it is the same server. I would really prefer not to use relative submodule paths, but I can try it.


author: Victor Debone
body: Did you have a chance to try [@Jack Zylkin](/t5/user/viewprofilepage/user-id/2540673) ? Did it succeed?
How and/or where can I get SSH public/private keys for Repository Stored Bamboo Specs
Asked by dmitriilobanov:

Hello, I'm trying to implement Bamboo Specs stored in Bitbucket Server repository.

For this I need to create Bitbucket repository in Bamboo by describing it in Bamboo Specs for the build plan being created/described. Where can I get SSH private/public keys for this repository? Documentation on [Bamboo Specs and Bitbucket server repository](https://docs.atlassian.com/bamboo-specs-docs/6.8.0/specs-java.html#bitbucket-server-git-repository) says that:
> When using specs in interactive mode, the Bamboo server can and fetch the data such as clone url or ssh keys from Bitbucket Server. In RSS mode it's not possible as user session is not available during automatic update.

I'm using RSS mode. I cannot pre-create a repository as a linked repository, and cannot use interactive mode. I want to create repository in Bamboo plan with Bamboo Specs RSS mode.

How can I generate these SSH private/public keys? Do I need to register them somewhere? How is it done with Bamboo specs?


Answers:
author: Marcin Gardias
body: Here's what you need to do.

* First, generate new ssh keypair: <https://confluence.atlassian.com/bitbucketserver/creating-ssh-keys-776639788.html>
* Then you go to Bitbucket Server repository configuration and register your public key as new Access Key: <https://confluence.atlassian.com/bitbucketserver/using-ssh-keys-to-secure-git-operations-776639772.html> (note: personal access keys work too; there are benefits and cons to either options which I'm not going to elaborate on here)
* In specs add both public and private key as the arguments to respective methods.

I hope this helps.

comments: author: Mihails Kuzmins
body: Could you please specify what you mean by "In specs add both public and private key as the arguments to respective methods."?


Tags: spec

ssh
jest-date-mock test fails in bamoo
Asked by kartik Shankar:

So, I'm using Jest for unit testing my NestJS application. I'm using jest-date-mock to mock the current Date. I've implemented the jest-date-mock npm package absolutely correctly. All tests pass fine on my local. But when the bamboo build runs, a few tests fails. Interestingly, if I comment out those failing tests some other test's fail(which were earlier passing), while all of my tests are independent of one another. Is there anything I'm missing here? What could be the possible cause for this unexpected behavior?


Answers:
author: Victor Debone
body: Hello [@kartik Shankar](/t5/user/viewprofilepage/user-id/3059556), welcome to the Atlassian Community :)

Do you have the same [capabilities and requirements](https://confluence.atlassian.com/bamboo/about-capabilities-and-requirements-289277171.html) configured on Bamboo as your local environment has?

If you have everything correctly configured, could you share some piece of your log that shows why your test is failing? That could help us figure out why the test is failing :)

Victor
Inline script ignores error
Asked by Ali Sahin:

Hi there,

quick question: I have an inline script step in my build process which basically calls

```
docker-compose build
docker-compose push
```

Today I figured in hindsight, that the build-command failed with

```
error	18-Apr-2019 13:29:45	Service 'xxx' failed to build: Error processing tar file(exit status 1): mkdir /var/www/html/: no space left on device
```

which is fine, but bamboo continued with the push and everything was shiny and green.

Why bamboo doesn't fail?

Thanks in advance.


Answers:
author: Victor Debone
body: Hello [@Ali Sahin](/t5/user/viewprofilepage/user-id/3059297), welcome to the community :)

In order to fail a build, an inline script must exit with a non-zero value.

If this error occurred inside Docker, or if I misunderstood the log, within the \`docker-compose push\` command. And regardless of the error, the command \`docker-compose push\` continued its execution, the Script task will not be able to understand the failure and stop the build.

Did it help you?

Victor

comments: author: Ali Sahin
body: Hi Victor,

thanks for welcoming me.

The error did not occured inside a Docker. It occured on the build machine which indeed build the images. The build of one image failed and bamboo ignored that error and continued with 'docker-compose push'.

My expectation is, that bamboo fails when an error occurs in 'docker-compose build'.

How am I able to detect this and return a non-zoer value?

Ali


author: Victor Debone
body: Ok, now I understand you better.

For this answer I assume you are running Bamboo in Linux. Because if you are running in Linux, your script task is running with bash, which makes sense from what you've described.

Bash scripts, if not altered or specified, will always exit with the exit code from the last command, which in your case is the \`docker-compose push\`. That is why Bamboo recognised it as a successful build, your \`docker-compose push\` worked.

Also, your script is defined in a way that regardless of the result of \`docker-compose build\`, the \`docker-compose push\` command will be run. So you probably want it to [automatic exit it on error.](https://stackoverflow.com/questions/2870992/automatic-exit-from-bash-shell-script-on-error)

Alternatively, you could separate this task into two, and define an artifact to share the build result of \`docker-compose\`, and avoid the issue with errors getting lost in the script.

Did it help you?

Victor


author: Ali Sahin
body: Thanks for the link.

I seperated the task into two. Now I have to watch :-D

<br />

Thank you very much, Victor.


Tags: docker

script
Support for Java 11?
Asked by Helen:

Is there anything offical regarding when Bamboo will support Java 11?

I'm aware of this article: <https://community.atlassian.com/t5/Agile-articles/Java-11-OpenJDK-support-update-for-Server-and-Data-Center/ba-p/967836> but that was published back in December.


Answers:
author: Victor Debone
body: Hello [@Helen](/t5/user/viewprofilepage/user-id/784933),

Currently, our position is stated in [this answer in another community post.](https://community.atlassian.com/t5/Agile-articles/Java-11-OpenJDK-support-update-for-Server-and-Data-Center/ba-p/967836#M406) In short, we are still not there yet, and you can follow [this suggestion BAM-20031](https://jira.atlassian.com/browse/BAM-20031) to keep track of our support for Java 11.

In other hand, we are keen to listen to our users and I may ask you: What are your plans of adoption of Java 11? If you don't want to share this details publicly, you can contact me directly at vdebone@atlassian.com.

Victor

comments: author: Helen
body: Thanks Victor. Given what's happening with Java 8, we're moving towards Java 11 pretty much ASAP. The preference is to have a single versionof Java across all installations, hence my question; I was hoping that there would be an update on the timeline for Bamboo's adoption of it.

Cheers,

Helen


author: mahfoudh yosser
body: * [@Victor Debone](/t5/user/viewprofilepage/user-id/1892075) Hi , is Bamboo support jdk openjdk11? is there any updates ?


author: ankit mishra
body: * ***;kk***


author: mahfoudh yosser
body: is Bamboo support jdk open JDK 11 ?

comments: author: Jeyanthan I
body: Hey [@mahfoudh yosser](/t5/user/viewprofilepage/user-id/3810717) ,

We are so close to supporting it in one of our upcoming releases. Please follow this [BAM-20031](https://jira.atlassian.com/browse/BAM-20031) for updates.

Cheers,  
Jey


author: Novicsa
body: Hi Jeyanthan,

Thanks for your information.

It is now July 13th, 2020 and still there is no release of Bamboo supporting Java 11. Also the product does not support PostgresSQL 11.

It really looks so behind the development and attention one can see in other products.

Is it Bamboo in some road to discontinue the product?


Tags: java
bamboo 6.8.1 zip is missing all the linux shell scripts in /bin/ to start the server
Asked by Jonathan Valliere:

I checked bamboo 6.8.1 and 6.9.0; neither have any of the shell scripts necessary to start the server. What is going on?

The documentation says they should be there <https://confluence.atlassian.com/bamboo/installing-bamboo-on-linux-289276792.html> refers to start-bamboo.sh


Answers:
author: Victor Debone
body: Hello [@Jonathan Valliere](/t5/user/viewprofilepage/user-id/109966) welcome to the Atlassian Community :)

What directory did you searched for \`start-bamboo.sh\`? I have downloaded the \`atlassian-bamboo-6.8.1.tar.gz\` from <https://www.atlassian.com/software/bamboo/download> and after extracting the package, I could find the \`start-bamboo.sh\` inside the extracted package \`bin\` folder.

Victor

comments: author: Jonathan Valliere
body: I actually ended up grabbing the OSX build which had the shell scripts. As I said the ZIP file does not contain the shell scripts; you are correct that the tar.gz file does. [https://product-downloads.atlassian.com/software/bamboo/downloads/atlassian-bamboo-6.8.1.zip](https://product-downloads.atlassian.com/software/bamboo/downloads/atlassian-bamboo-6.8.1.zip?)


author: Victor Debone
body: Ok! Now I understand your point.

I will raise an issue to improve the naming of this files as depending on the file ending for OS separation is indeed confusing.

Thanks for bringing this up :)

Victor


author: Jonathan Valliere
body: All the other Atlassian products I use seem to have identical ZIP and TAR.GZ archives. I was expecting the ZIP to contain the shell scripts. Its pure laziness on my part because typing "unzip" is faster than the "tar -zxvf".
Can a custom field update trigger a custom screen to pop up?
Asked by John Lord:

I want a screen window to pop up after adding a value to a field in jira. Similar to a transition window. Is this possible?


Answers:
author: Vijay Dadi
body: [@John Lord](/t5/user/viewprofilepage/user-id/5435545) ,

Yes, that is possible. You should have your custom field linked to a jira field and added to issue edit screen.

* Create a custom screen and add your custom field to it.
* Attach custom screen to a related workflow.
* Add screen in the transition step in the workflow.
* When the transition happens, you should get a pop-up screen to update the value.

Hope this helps !

Vijay


author: Mikael Sandberg
body: It is not possible in a screen, but you could do it by using [Forms](https://support.atlassian.com/jira-service-management-cloud/docs/use-forms-in-jira-service-management/). Forms allow you to create dynamic sections that are only visible based on selected values in a question.


Tags: cloud

jira-service-management

jira-service-management-cloud