youngmon/atlassian-qna huggingface dataset:
Are bamboo deployment tasks cloneable?
Asked by Kai Lochbaum:

I'm currently playing around with a deployment project with multiple environments (show/live).

After setting up the show environment including the deployment tasks, the live environment must be set up starting from zero which basically means, that the same tasks with some (minor) modifications must be added again.

Is there any way to copy all the configured tasks from one environment to another or even better is it possible to set up cross environment tasks which use variables defined for each environment?

e.g. in a very simple project the only task could be executing an rsync to a specific host and directory. One would define a task which does the rsync but host and path are taken from a variable.

I'm using the latest 5.1.1 version of bamboo.


Answers:
author: Jason Monsorno
body: Not yet, please upvote this feature request: [BAM-13473](https://jira.atlassian.com/browse/BAM-13473 "BAM-13473")

I'd also suggest leaving a comment describing your scenario as this may not be a perfect desciption of what you are looking for.

You can clone jobs in the other workflow so [BAM-13346](https://jira.atlassian.com/browse/BAM-13346 "BAM-13346") may be more what you're looking for.

comments: author: Kai Lochbaum
body: Thanks, upvoted the issue :)


Tags: bamboo-administration
Recommended Bamboo installation directory
Asked by Nathan England:

Hello, I'm relatively new to Linux and want to install Bamboo on RHEL 6. I've been following the installation guide for Bamboo, and it mentions a home directory and an install directory, but I am curious, what is the best place to extract/install Bamboo on a Linux machine?

Any recommendations?


Answers:
author: Harry Chan
body: You can go with Atlassian's conventions:

/opt/atlassian/bamboo for the install and /var/atlassian/application-data/bamboo for the home directory.


author: HenriqueA
body: Greetings Nathan,

Where you will extract bamboo is of your choice. It doesn't need be in a specific place. However, your Bamboo Home Directory cannot be the same as the Bamboo Installation Directory. Just as a tip I have my bamboo installation directory in /home/henrique/atlassian/bamboo_inst and Bamboo Home Directory is in /opt/atlassian/bamboo_home.

Just avoid having a directory name with a space on it.

Regards,

comments: author: Peter Boughton
body: \> Just avoid having a directory name with a space on it.Why?


author: EricHickman
body: Having spaces in directory names can cause issues with scripts. Some of the difficulties are listed here: <https://askubuntu.com/questions/101587/how-do-i-enter-a-file-or-directory-with-special-characters-in-its-name>


Tags: bamboo-administration
How to trigger bamboo from github?
Asked by Julio Faerman:

I have seen setup instructions for repository triggered builds for git, but using shell hooks, could not find how to do it using github web hooks.

I configured the repository and i can see a web hook in my repository. I also configured the bamboo hook, the test passes (payload deployed) but the buid does not run.

Any advice on how can i make the commits trigger builds? Is there a log i could use to debug this?


Answers:
author: Stefan Mohr
body: Ashley Lewis's answer got me most of the way, but I had to fiddle a bit to get the correct settings for a GitHub repository and a Bamboo On Demand server.

On GitHub, go to your repo settings \> Webhooks \& services

Add the Bamboo service template

Base url: https://(yourcompany).atlassian.net/builds

Build key: Bamboo key for the plan. If you're unsure of the exact syntax, open Bamboo in your browser and go to your plan summary. The key is in the URL.

Username and password are credentials for a Bamboo user that has permission to execute builds.

comments: author: Marakai
body: For the current API this is the right and simplest answer. I just spent the morning switching our Bitbucket repos to Github and this was smooth \& easy.

There are then a number of things you need to switch over in Bamboo in the Repositories and Triggers sections. Adding generic Git repositories instead of Bitbucket Server/Cloud in Repositories and adding a new Remote Trigger in Triggers.

What I haven't figured out yet is whether I really need the IP address in Remote Triggers. Docs say yes, the entry field says "optional". Reckoned I'd play it safe.


author: Ashley Lewis
body: There is info about this here, it's very thorough:

<https://confluence.atlassian.com/bamboo/repository-triggers-the-build-when-changes-are-committed-289276902.html>

But, it does not mention GitHub hooks. Here's how to create a GitHub hook:

<https://developer.github.com/v3/repos/hooks/#create-a-hook>

Where the "url" property of the "config" object would be of the form http://(YOUR.BAMBOO.SERVER:PORT)/updateAndBuild.action?buildKey=(PLAN.KEY.TO.TRIGGER)

comments: author: Ashley Lewis
body: I tried Stefan Mohr's suggestion:

On GitHub, go to your repo settings \> Webhooks \& services

Add the Bamboo service template

But I couldn't find the Bamboo service. I'm sure it was there a while ago. Did they remove it?


author: Josh Padnick
body: I've been searching around for support for GitHub Webhooks as well and I find it shocking that this feature is missing. Or if it's not missing, certainly the documentation is. Can we get an official response from Atlassian on Bamboo and GitHub WebHooks?


author: J?nas Tryggvi J?hannsson
body: Any news on this? This is not working for elastic bamboo, so we have to pull our github repo - which is very backwards as these are both web services.

I would assume that this would be very beneficial for atlassian, as they do not have to have a git deamon running if we could trigger builds via integration/webhook.


Tags: github
What do I set CATALINA_HOME to for a Bamboo install on Windows?
Asked by garcara:

When I try to start Bamboo, I get the following error:

To run Bamboo in the foreground, start the server with start-bamboo.bat /fg

The CATALINA_HOME environment variable is not defined correctly

This environment variable is needed to run this program

What do I need to set the variable to?


Answers:
author: garcara
body: After searching around the batch files I found it wanted the default install directory C:\\Program Files\\Bamboo
Branches queded for too long
Asked by Juan Ignacio Onetto:

Hi. My bamboo ondemand instance is taking to long to receive too receive the build request in the branches plan.

The agent log doesnt say anything about it other than: on i-7a5b9816' ready to take build from queue...

2013-09-13 03:44:31,800 INFO \[tunnellogger-thread\] \[LocalAcceptor\] \[tunnelserver:26224-1-thread-234\] Accepted a local connection on port 4527, tunnel age: 132s

When I run the master branch of the plan it starts inmediately with no problems. Any ideas?


Answers:
author: Juan Ignacio Onetto
body: How do you know or read in the logs that is the reason?


author: Juan Ignacio Onetto
body: Hi MArcin,

Yes it is. But I have tried with another repo and this same thing doesnt happen. This is specially happening with one of the repositories all of the residing in Bitbucket. The difference is that this one has much more branches than the other. However I tried disabling all the branches to see if it was a matter of the number of branches and didn help.

Yesterday one of the branched took 8 minutes to start.. is that normal?

comments: author: Marcin Gardias
body: It's possible that your branches get stuck waiting for a free worker thread and that's why it takes so long.

We have that issue on our radar.


author: Marcin Gardias
body: Do you have automatic merging switched on? Because that would explain a lot as merging takes some time, during which Bamboo reports that branch is 'queued'.


Tags: cloud
How do I force Bamboo to include double quotes in a command?
Asked by Jim Morris:

We are using Visual Studio to build one of our projects, and the way you specify the project to be built is by using the syntax Config\|Platform. When the Config name has an embedded space Bamboo properly embeds the whole string in double quotes. When the Config name does not have an embedded space, it does not include the double quotes. This breaks the build, as the OS interprets the pipe symbol.


Answers:
author: Jim Morris
body: The answer is to precede the pipe symbol with the command shell escape character: \^
Using a bamboo variable in git repository branch configuration
Asked by tc-mossridge:

Is there any way to use a bamboo variable for the branch name when configuring a source repository?

I would like to be able to specify the tag name to fetch in a variable when releasing a version from JIRA.


Answers:
author: roy_lyons
body: Yes. We use a variable called git.branch.name and use it as ${bamboo.git.branch.name} in the branch area


author: Marcin Gardias
body: You can use variables in the repository configuration, but the caveat is, the repository configuration needs to resolve to sth. that exists.

So if the tag already exists when you trigger the build it should work.

But if you create the tag during the build it won't work, as Bambo will try to find the revision on tag that not exists yet.

There might be a workaround but I haven't tried that:

- define repository with a variable in branch field

- set that variable to 'master' (or whatever that works)

- before checking out, use this Task: <https://marketplace.atlassian.com/plugins/com.atlassian.bamboo.plugins.bamboo-variable-inject-plugi>n to change the value of the variable

comments: author: tc-mossridge
body: I created the tag in the stash repository before doing the release from JIRA. I tried to run the release with the repository branch name set to ${bamboo.jira.version} but it didn't seem to parse the variable, saying it couldn't find the branch '${bamboo.jira.version}'. I tried the same with a custom Plan Variable but got the same result.
Dedicate an agent to a build plan
Asked by Jan Swaelens:

Hi,

The new feature to dedicate agents to a deployment rocks! Could this also be provided to build plans?

thanks


Answers:
author: Jason Monsorno
body: There is a hack/workaround in place if you **need** to use it now, it is a rather annoying one. Remote agents are controlled by the server capabilities, local agents are as well except you can add "Agent-specific capabilities" as well. You can limit the agents a build can use by capability dependencies; if all your builds have a unique agent or agent sets you'll have dedicated agents.

comments: author: Jan Swaelens
body: Yeah I have this setup for some plans already but it's a pain and as you indicate a bit hacky. Thanks for the reply nevertheless!


author: Michael Knight
body: Proper support for this is coming in Bamboo 5.6. See [this comment](https://jira.atlassian.com/browse/BAM-3491?focusedCommentId=610920&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-610920) for more information.


Tags: bamboo-administration
Use of deployment projects
Asked by Martijn van der Kamp:

Can you start or continue a plan after running a deployment project?

I want to automatically start a set of tests after deployment, but the concept of deployment projecs limits me to the use of tasks.


Answers:
author: RianA
body: Hey Martijn,

You could still do the testing from the set of tasks that you have in the Deployment project. Or are you going to use certain stages in testing? There's a feature request in adding trigger every stages finished. For more information, please refer to the following link.  
\* <https://jira.atlassian.com/browse/BAM-13347>

Hope it helps.

RJ


Tags: bamboo-administration
How can I start a bamboo job with an empty working directory (without SCM repo)?
Asked by Axel Tetzlaff:

I have a job that operates on files from a shared artifact by a previous stage. The job generates new files (ruby -\> Gemfile.lock).

I would assume every build starts with a clean working dir, but it looks like the generated files from the previous build are still there. How can I ensure that every build of this job automatically starts in a clean state?


Answers:
author: Bob Swift (personal)
body: See <https://jira.atlassian.com/browse/BAM-11714>


author: Jason Monsorno
body: Each job under the configuration -\> Miscellaneous has a "Clean working directory **after** each build" option. Setting this option later in the process, now that you have unclean working directories, becuase is cleans the directory **after** the build and is a pain because you'll have to cycle through all your agents with "bad" builds to get it working. If you can spare the down-time you can clear the entire build-dir folder (in bamboo-home\\xml-data) to delete all your working copies once.

comments: author: Bob Swift (personal)
body: While that option may save disk space, it is more important to have a "before" option that makes builds work correctly ;).


author: Fran?ois-Marie de Jouvencel
body: I just execute a script with the single line: "rm -R \*" before anything else. This allows me to have a clean build folder before the tests, and a dirty one afterwards for analysis.

I'm really not too happy about this solution, but since there is nothing of value on the bamboo machine I don't care if it messes up :smile:

comments: author: Bob Swift (personal)
body: Unfortunately, that also clears out any artifacts that are copied into the working directory


author: Axel Tetzlaff
body: This does solve the problem in case of successful build but makes it impossible to debug a failed build.

Cleaning the xml-data directory in a distributed environmen with several parralles plans is not an option (and does feel quite hacky too ;-) )

comments: author: Jason Monsorno
body: I haven't tried it in a Job yet, but maybe you can follow the Deployment workflow. You can't use their clean task but you can write your own then use the Artifact download which is available to Jobs/tasks. I'm using V5.1.0 but you'd need atleast V5.0.0


Tags: bamboo-administration
Remote Agent and Unsatisfied Plugin Dependency
Asked by Anderson:

Hello,  
We installed and configured Bamboo Remote Agent to run a build on a remote server. Communication between the remote agent and the Bamboo server seem to be established successfully.   
Bamboo server has one custom plugin which we downloaded from Atlassian Marketplace - called Project Variables.  
When we run a simple test plan with the Remote Agent, which does not even include Project Variable usage, we get this error message (pasted below).  
This is part of our Production build.  
Please advise as to how to resolve this?

"Error occurred while executing the build for TR2-TR2-JOB1-1

(org.springframework.beans.factory.UnsatisfiedDependencyException : Error creating bean with name 'net.collabsoft.plugins.bamboo.projects.ProjectVariables': Unsatisfied dependency expressed through constructor argument with index 0 of type \[com.atlassian.upm.license.storage.lib.ThirdPartyPluginLicenseStorageManager\]: : No unique bean of type \[com.atlassian.upm.license.storage.lib.ThirdPartyPluginLicenseStorageManager\] is defined: Unsatisfied dependency of type \[interface com.atlassian.upm.license.storage.lib.ThirdPartyPluginLicenseStorageManager\]: expected at least 1 matching bean; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type \[com.atlassian.upm.license.storage.lib.ThirdPartyPluginLicenseStorageManager\] is defined: Unsatisfied dependency of type \[interface com.atlassian.upm.license.storage.lib.ThirdPartyPluginLicenseStorageManager\]: expected at least 1 matching bean) "


Answers:
author: Remie Bolte
body: @anderson: we have updated the Project Variables add-on to fix this issue. If you download the latest version of the add-on you should be able to use it without getting this error.


Tags: dependency

remote-agent
Launching Windows commands on remote agent
Asked by Marco Rossi:

In Bamboo 5.1, I'm trying to configure a remote agent to run a build of a plan.

The remote agent successfully runs every task in the job, except the last one containing a simple Windows command to move a file ("move" Windows command configured in Bamboo as an executable).

I've tried to specify the command in several ways (with complete path or not) and then trying to use a different command (xcopy), but all the tries failed with the same error:

"Unable to find executable at move"

or

"Unable to find executable at xcopy"

What I'm missing or doing wrong?

Thanks


Answers:
author: Gretchen
body: What is the syntax you are using? Are you trying to move the executable to a different location on the same target system or on a different one? One hint, Robocopy does a much better job of communicating errors than xcopy does.
Using artifactDefinitionManager.findArtifactDefinitionsByPlan
Asked by carolyn cheng:

I tried to use this api with a correct chain instance or a plan instance, but I always got nothing back. How do I use this function correctly?


Answers:
author: carolyn cheng
body: I have to use artifactDescriptionID to do it.


author: Marcin Gardias
body: This method searches by 'producerJob' field: you need to pass Job instance to this method.

You can also use findSharedArtifactsByChain (latter assumes that your artifact is shared, which probably should be the case if you want to use the artifact in subsequent stages)
Bamboo git checkout works too long
Asked by Vasily Sergeev:

have some trouble with git checkout tools in Bamboo. It works too long. For example I have two repos. I can clone them to local machine in 5-10 minutes. But checkout task stucks at
> Fetching 'refs/heads/release-1.69' from 'ssh://git@ \[path/to/first/repo\] .git'.
>
> Git: remote: Counting objects
>
> Git: remote: Compressing objects (120)
>
> Git: Receiving objects (269)
>
> Git: Resolving deltas (83)
>
> Git: Updating references (1)
>
> Git: Total 269 (delta 83), reused 128 (delta 31)
>
> Checking out revision 7c11b20b2495be8bb8091839794c4e80bdc7651e.
>
> Creating local git repository in 'path'

Sometimes this task take 150 minutes, sometimes it even has no end.

Another trouble that stopping plan with that task not stopping the agent. The only way to reanimate agent is restart it.

Is it something wrong with agent? Or I make mistake with configuring repos?


Answers:
author: Wayne Allan
body: We are seeing this issue as well we are using ondemand with elastic agents. When we run the command from gitbash it only takes 3 mins but from bamboo it takse about 25 -35 mins, almost ten times longer.

comments: author: Shankar Hullur
body: Hi Wayne, I am having the same issue with Source code check out. It takes almost 2 hours to checkout the code.

I am running on Windows boxes.. I read in other articles that we can first add script that runs checkout...

Could you please let me know how to do that...

I selected "Script" task and inline added commands

git clean -f -d

git checkout \<branch-name\>

It did nt work


author: Webb Morris
body: I have experienced the same behavior when using a BitBucket repository. The best fix that I have been able to come up with is to regular update the AWS image that is used by Bamboo to perform the build to have a fairly recent version of the repo. This is especially important if large files have changed or been added to the repo.


author: Ayhan Binici
body: I can verify this issue on my Bamboo-installation when trying to clone a repository that resides on BitBucket.


author: Jason Olsan
body: I'm having the same issue, but only on my "develop" branch. My "master" and all feature branches build correctly, but for some reason, my "develop" branch sits at "Checking out revision" and hangs. I even let it run overnight once. No change.


author: Fricco
body: Hi, I also face the same issue. Some times it hangs even for hours fetching the repo in the elastic instances. I read somewhere else that it seems that the git version that comes by default in the elastic instances is buggy and should use the official git. Any idea how that can be done?

Thank you.


author: Shankar Hullur
body: Hi All,

I am also facing the same problem when we do "Force clean build". Did anybody got it resolved ..?

Thanks,

Shankar


author: Przemek Bruski
body: Weird - we are using standard git command for the checkout. We also use Git internally **a lot**

Are you guys all using Bamboo OD/elastic agents or is it unrelated?

comments: author: Vasily Sergeev
body: It\`s unrelated


Tags: bamboo-administration
SCP pipe: multiple artifacts
Asked by Admin Admin:

hello,

how can I deploy several files in one pipe invocation?

calling pipe just to copy one file seems not efficient at all.

example:

bitbucket_pipeline.yml

-- from the build step

```
artifacts:
  - node_modules/**
  - .nuxt/**
  - package.json
  - .env
```

i'd like to copy package.json and .env files to the same remote location in one pipe call...

And actually, all these artifacts should go to the same location on the remote host...

thank you.


Answers:
author: Norbert C
body: Hi [@Admin Admin](/t5/user/viewprofilepage/user-id/4720087)

Thank you for contacting Atlassian Community. My name is Norbert and I'm a Bitbucket Cloud Support Engineer, it's nice to meet you!

I'd like to inform you that unfortunately it's not possible to copy multiple files and/or directories at the same time with SCP.

What I would like to recommend you is to compress these files into one file and then copy the compressed file to the remote server.

For example:

```
tar -czvf artifacts.tar.gz node_modules .nuxt package.json .env
```

Once the artifacts.tar.gz file is created, please copy this file with SCP.

Please let us know how it goes.

Best Regards,  
Norbert  
Atlassian Bitbucket Cloud Support

comments: author: andrew zyman
body: Norbert, thank You for clarification.

I ended up doing exactly what you suggest.

What about the speed of transfer -

* I observe it to be 1mB per minute- [https://community.atlassian.com/t5/Bitbucket-questions/pipe-scp-extremely-slow-performance/qaq-p/1920391?utm_source=atlcomm\&utm_medium=email\&utm_campaign=accept_as_solution_reminder\&utm_content=topic](https://community.atlassian.com/t5/Bitbucket-questions/pipe-scp-extremely-slow-performance/qaq-p/1920391?utm_source=atlcomm&utm_medium=email&utm_campaign=accept_as_solution_reminder&utm_content=topic)


author: Norbert C
body: Hi Andrew,

I asked a couple of questions in that community question.


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

scp