youngmon/atlassian-qna huggingface dataset:
Can Atlassian provide a richer default AMI for ElasticBamboo?
Asked by Robert Watkins:

Given the snafu with the Elastic AMI for Bamboo 5, and not being able to install common new packages, would it be possible for Atlassian to provide AMIs that come configured with some of the more popular extensions?

For example:

\* firefox - for use with Selenium testing

\* PHP

\* PostgressSQL

Failing that, can you make sure that the examples listed on [https://confluence.atlassian.com/display/AOD/Populating+your+EBS+volume](https://confluence.atlassian.com/display/AOD/Populating+your+EBS+volume%20)actually work?


Answers:
author: Robert Watkins
body: Sorry for the attitude - I came down a bit snarky when I realised I'd have to spend my evening getting the build environment working again.

Anyway, I was thinking about this - and I think what you should do is crowdsource it.

* Add the ability to define a capability via a Chef or Puppet recipe
* Have a library of recipes already pre-defined - the existing capabiliites are a good candidate for that
* Have a community-maintained library of additional recipies - things like Firefox, etc, can be added to that
* Have a testing image that can be used to verify these recipies - an image that _doesn't_ shut itself down if it's not started by Bamboo, or that dies an hour after being started. Heck, make it a Vagrant script so it can be tested locally
* Have a way of adding custom recipes - upload them to the Bamboo instance, or pull them down via source control, or whatever.

Going recipe-based would make setting up an image a lot easier. Plus it would give you an option to bake a custom image directly from the Bamboo isntance, thus saving on start-up time.

Okay, that was my feature suggestion. I'm off to spend my evening trying to get Firefox installed again. (I meant it when I said you need to update the doco - that's been broken for months now)


author: Nelson Silva
body: I've just started working on a solution to make custom Elastic Bamboo Images here <https://github.com/inevo/bamboo-elastic-image-packer>It uses Packer (<http://www.packer.io/>) with some simple shell and chef provisioners.I'm using an Ubuntu Cloud AMI as base and the Makefile will only work on Ubuntu for now.I also added a simple Vagrantfile that reads Packer's config so I can test the provisioning locally.I'm extending it as needed for our own images but it should be easy to add/remove capabilities.Hope you find it usefull.


author: Przemek Bruski
body: We think we already have way too many images.

We may come up with a better way of setting up the image (like providing some checkboxes that would let you choose what ends up on an instance).

With Bamboo 5.1, we will have an Ubuntu image - it's far easier to set up firefox on it.

We are also thinking of making the image upgrades opt-in - i.e. you would be able to keep your old image after upgrade.


Tags: cloud
How can I connect a JIRA Release to a Bamboo Build after the fact?
Asked by Swift Capital:

My team publishes a Release by manually triggering a build in Bamboo instead of triggering it via the JIRA Release.

I'd like to connect the JIRA Release to that manually triggered Bamboo build without making a new build.

Is there a way to do that?


Answers:
author: Przemek Bruski
body: No, at the moment there's no way of doing that.


author: Sultan Maiyaki
body: Hi,

I have raised an improvment request on your behalf at <https://jira.atlassian.com/browse/BAM-13671> I will encourage that you vote and watch it for updates

comments: author: Swift Capital
body: I already added one here: <https://jira.atlassian.com/browse/AOD-6727> (we use OnDemand). I linked them for Atlassian team to modify at their discretion.


Tags: cloud
Can I export/import individual projects/plans
Asked by James Youngman:

I have 2 Bamboo machines running different versions of Bamboo. Is it possible to export a single plan from machine #1 and import to machine #2 ?

Thanks


Answers:
author: Przemek Bruski
body: There's an unofficial REST endpoint that will let you export a plan - but there's nothing to import it, sorry.

comments: author: James Youngman
body: Would I be able to export my entire Bamboo 3.4.1 machine and import it into a Bamboo 4.4.5 machine?


author: John Bowker
body: Now I'm curious. What is this unoffical REST call?

I see there is an "export" rest call but I've never be able to get that working.


author: James Youngman
body: Would I be able to export my entire Bamboo 3.4.1 machine and import it into a Bamboo 4.4.5 machine?


author: ssetayeshfar
body: Hi James,

The "Move Plans" option from under Administration - \> Plans will allow you to move a plan completely to a new or existing project within the same instance of bamboo but it's not a cloning option and you will lose the original plan.

To clone a plan and moving all the logs and histories, there needs to be a partial export/import option and it's not doable at the moment. There is an open improvement request ticket for this feature in our system:

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

to which you can add yourself as a watcher to recive updates.

When researching for this issue, I also came across the following and thought of sharing them with you in case you want to follow them as well:

1) <https://jira.atlassian.com/browse/BAM-12365>

2) <https://jira.atlassian.com/browse/BAM-3188>

3) <https://jira.atlassian.com/browse/BAM-11313>

Hope this helps!

Best,

Sepideh
What table, if any, is plan name in?
Asked by Dave Brunkow:

I'm trying to run a query against the Bamboo database and I can't find any of our plan names. I've manually gone through every table and googled for a bit. I find project and stage names, I even find plan_id but now plan name. Little help?


Answers:
author: Przemek Bruski
body: The table you're looking for is called BUILD.

comments: author: Jason Monsorno
body: WHERE BUILD_TYPE = 'CHAIN'
Is Bamboo SBT plugin compatible with Bamboo 5.0?
Asked by Antti Plathan:

Atlassian Labs' Bamboo SBT plugin is the last plugin in our environment that isn't listed as compatible with Bamboo 5. Does anybody have production environment experience with the SBT plugin, i.e., does it work with Bamboo 5?


Answers:
author: RianA
body: Hi, it seems that [Bamboo SBT Task](https://marketplace.atlassian.com/plugins/com.atlassian.bamboo.plugins.sbt.bamboo-sbt-plugin) does not support Bamboo 5.0 and above. Apparently it is supported until version 4.4.3. Hope it helps.

comments: author: David Hoyt
body: This is important for us and a serious blocker from adopting Bamboo. Can somebody resurrect this and get it working w/ Bamboo 5? We're currently evaluating Bamboo 5.4.2. If it's no longer supported, any chance it could be open sourced?


author: Antti Plathan
body: SBT plugin is not needed to use SBT with Bamboo. We uninstalled the plugin and use SBT with scripts in projects' root, i.e. a bash script in script/ci/{release, setup, tear_down, test}

Something like this:

#! /usr/bin/env sh  
DIR=\`pwd -P\`  
echo "CURRENT DIR: $DIR"  
echo "JAVA_OPTS: $JAVA_OPTS"  
echo "Cleaning project..."  
/usr/local/bin/sbt $JAVA_OPTS clean  
echo "Done."

comments: author: David Hoyt
body: What about test results?


author: Richard Cross
body: That's not a very clever argument: of course everything and anything can be done at command line, so by that logic no plugins are "needed" apart from the Script Plugin.The weakness in the using the Script Plugin is that your build job doesn't automatically generate the requirements it has, which means more manual maintenance, every time you upgrade SBT to a more recent version.


author: Richard Cross
body: And, as David Hoyt points out, what about test results?


author: Antti Plathan
body: Agreed, but since there is no apparent upgrade for the plugin in sights, I provided a workaround.


Tags: bamboo-administration
Manual stages in bamboo 5 deploy plans
Asked by Russell Moore:

pre-5.0 we had deployment stages as part of our build plans. With 5, having shared artifacts is nice, but maybe I'm missing something on the deploy plans - no stages, and no way to make steps manual?

here is the scenario: deploying to the produciton environment pushes an ear artifact out to several physical hosts with instances of jboss on each. What we have done in the past is to push to a single host to do smoke testing live in producion before copying the ear to all servers. This minimizes exposure to issues should there be a production-specific problem.

How we had this set up before was a stage for the first server - push the ear, restart jboss with the new ear in place, and pause. Once testers were done validating against the single server, we would resume and deploy across the rest of the server cluster.

I don't see a way to do this, except to maybe define them as different environments completely? which means a human error could cause different artifacts to be deployed across the same environment.


Answers:
author: Jason Monsorno
body: As of 5.0.1 (newest released to date) the Deployments have a single non-concurrent/syncronize workflow per environment. A workaround to this would be to setup the deployment having two enviroments, each one can be triggered seperately.


author: Cristiano Mariano
body: Hi guys!

Do you know whether this feature is on Bamboo roadmap?

Thanks,

Cristiano


author: Russell Moore
body: Meh - is what I had assumed, thanks Jason.

Guess we'll leave it in the old style where we deploy in the build script for now.


Tags: bamboo-administration
Using bamboo to deploy sql databases
Asked by Gordon Durgha:

I am interested in using Bamboo to deploy .NET applications, we have a seperate database team that is currently script their database (a .sql file for each SQL object). I would like to find out if Bamboo is capable of taking these .sql script files and deploying them to a database server.

Thank you


Answers:
author: RianA
body: Perhaps this documentations could help:

\* <http://blogs.atlassian.com/2012/05/database-continuous-integration-redgate/>

\* <https://www.simple-talk.com/blogs/2013/03/21/continuous-integration-for-sql-server-using-red-gate-tools-atlassian-bamboo-and-github/>


author: Przemek Bruski
body: You can also use this: <http://mojo.codehaus.org/sql-maven-plugin/> especially if you already use Maven. It's a very simple solution comparing to the other ones discussed here.

If you already handle complex things like versioning in external tools and you just want to run the scripts, it may be what you want.


author: roy_lyons
body: We use flyway to version the database. This can be invoked as part of the maven commands or through using flyway.sh. this should solve your problem.


author: Jason Monsorno
body: We use ApexSQL Diff to generate the diffs and sqlcmd to deploy.
How to configure Bamboo to run over both HTTP and HTTPS
Asked by Serge Dukic:

Is there any way to configure Bamboo to run over both HTTP and HTTPS? I've enabled it so that going to <https://bamboo> returns a page, but users are immediately redirected to the plain HTTP version of the site. I am assuming that this is due to the "Base URL" configuration variable.

What would be ideal is that if a user came in on the HTTPS URL that all associated links in the application recognise this and link to the HTTPS version of the content.


Answers:
author: Saurabh Pratap Singh
body: Hello, DO we have any solutions, we are facing issue after the upgrade to 7.0.4 version of bamboo?


author: LucasA
body: Hi Serge,

The Base URL is used for composing links, so it may be the reason why the users are being redirected for HTTP. I suggest you to change it on _Administration -\> System -\> General Configurations_.

Regarding to the following statement:
> What would be ideal is that if a user came in on the HTTPS URL that all associated links in the application recognise this and link to the HTTPS version of the content.

Is that what you meant?
> What would be ideal is that if a user came in on the **HTTP URL** that all associated links in the application recognise this and link to the HTTPS version of the content.

In this case I believe you would need to enable the HTTP -\> HTTPS redirect on Jetty. I couldn't find any oficial documentation for that, but the following link may help:

- <http://serverfault.com/questions/367660/how-to-have-jetty-redirect-http-to-https>

Best regards,  
Lucas Timm

comments: author: Serge Dukic
body: Hi Lucas,

Sorry for not having made myself clear. I meant that Bamboo should be fully usable over both HTTP and HTTPS (no redirects from one to the other) based on what URL the user chooses to use. i.e. if the user goest to the HTTPS link, all the URLs used in the application will also be HTTPS. In the case that the user goes to the HTTP link, all URLs will be HTTP.

Basically, having a fully functional site over both HTTP and HTTPS and leaving it up to the user to decide which to use.

The reasoning behind this is that some of our users would like to keep their credentials private and in cases where they use their credentials would prefer to communicate with Bamboo over SSL. In cases where they access Bamboo programatically, they usually use a machine account, in which case speed is preferable over security.

Hope this helps to explain what I originally meant.


author: Harry Chan
body: I would stick with ALL HTTPS due to base URL issues.


Tags: bamboo-administration

https

ssl
Automatic Commits - Commit Message
Asked by Ben Clayton:

Is is possible to pass bamboo variables to the automatic commit message set in the administration area of Bamboo? When auto-merging branches it would be helpful if the branch name could be passed to the commit message.


Answers:
author: RianA
body: By right Global Bamboo variables can be passed almost everywhere. If the commit message can be passed through Bamboo I believe it should be possible.


author: Przemek Bruski
body: Variable substitution is not applied to commit messages.

Depending on your Bamboo version, the information on branch names may already automatically added to commit messages. I think Bamboo 5 is the first version to have that.
deployment to multiple hosts using bamboo
Asked by RepuD:

What is the bamboo'ish way to achieve the following :-

1) nightly deployment of green builds to 10 dev environment hosts - no approvals required

2) nightly deployment of green builds to 4 integration environment hosts - if approved by test managers

The hosts are all solaris. The manual process to deploy is scp package to host, pkgrm old version, pkgadd new version, run appserver redeploy script.

Is there a way for a bamboo deployment environment to contain multiple hosts and the tasks are looped once for each host?

Regards Rep


Answers:
author: Julian Riedinger [Decadis AG]
body: I think the best way ist to use one ore more scripts which are scheduled an contains the specific tasks

We have sth like that to deploy our builds to multiple JIRA instances:

```
cd path/to/your/builddeployCommand1deployCommand2...

```

This is part of a job which is excecuted after a sucessfull build. But you can specify this on your own

Hope that helps a little

Julian

comments: author: RepuD
body: I was expecting something a little more refined. like within a deployment environment (say Dev) you can set up a list of deployment targets (dev1host, dev2host, dev3host, etc) and a deployment tasks template which can then be run for some or all hosts in the deployment targets list (passing in the host name as a variable to the deployment task template).

sure i can script things manually as you show above but then you lose the ability to have different environment/host owners approve/initiate the deploy to different hosts/environments (and also the audit trail of the same)


Tags: deployment
Amazon Remote Agent & License Remote Agent count
Asked by Ken Wood:

Sorry, I tried to find this but no luck... anyhow, if you use remote agents in Amazon Elastic Cloud do they count against your remote agent count, i.e. if you have a 25 remote agent license, and 24 are currently being used on local resources, does that mean I could only have 1 remote agent in Amazon Elastic Cloud? (I'm pretty sure the answer is 'yes', elastic agents count as part of your set of remote agents, but I can't find it in black and white, only via inference.)

Thanks.


Answers:
author: Przemek Bruski
body: Yes, for the purposes of licensing the elastic agents are treated like remote agents. With 25 agent license and 24 remote agents active, you can only have one elastic agent running (but of course you can have as many image configuration as you want and have Bamboo select the correct one to run as an elastic agent).


Tags: licence

remote-agent
Helmfile has a lot of errors in bitbucket-pipeline
Asked by carlos_mathiasen:

Hi guys, We have a problem with our pipeline.  
We need to create a dynamic helmfile.yaml with a python script in pipeline, and use artifacts to pass to another step and run

```
helmfile apply 
```

<br />

If I run locally and manually all steps in the docker image, all works correctly, but in in bitbucket We always has a error with the yaml, our bitbucket-pipeline.yml:  

```
tags:
  'v*':
    - step:
      name: "Prepare helmfile"
      image: python:3.7.2
      size: 2x
      script:
        - cd ./.infra
        - python myscript.py prd $BITBUCKET_BUILD_NUMBER
        - cp ../charts/helmfile.yaml ../helmfile.yaml
      services: 
        - docker
      caches: 
        - docker
      artifacts:
        - helmfile.yaml
    - step:
      name: "Release"
      trigger: manual
      script:
        - aws eks update-kubeconfig  --region us-west-2
        - 'echo -e "\n - image_tag: $BITBUCKET_TAG" >> helmfile.yaml'
        - helmfile -e prod apply
```

we have errors like:

```
map has no entry for key "chart_repository"
```

or

```

in ./helmfile.yaml: failed to read helmfile.yaml: reading document at index 1: yaml: line 25: mapping values are not allowed in this context
```

> If we do a cat helmfile.yml in the Release step, we can see the entire file and is Ok.

<br />

locally we run image:  

```
docker run -it --rm -v $(pwd)/:/myapp myrepo.amazonaws.com/base:latest sh

```

and inside the container

```
python myscript.py prd $BITBUCKET_BUILD_NUMBER
helmfile -e prod apply
```

and works perfectly.  
What is wrong in the pipeline?


Answers:
author: Igor Stoyanov
body: [@carlos_mathiasen](/t5/user/viewprofilepage/user-id/4716067) hi. Thanks for your question.  
Maybe problem is with

```
'echo -e "\n - image_tag: $BITBUCKET_TAG" >> helmfile.yaml'
```

added to your helmfile with wrong indentation.  

Maybe try to use [envsubst](https://www.gnu.org/software/gettext/manual/html_node/envsubst-Invocation.html) (your should have helmfile template and helmfile.yaml will be generated dynamically with each build):  

```
envsubst < helmfile.tpl.yaml > helmfile.yaml
```

<br />

Please read this article:  
<https://github.com/roboll/helmfile/issues/429#issuecomment-455864318>  

Additional links:  
[envsubst example](https://bitbucket.org/bitbucketpipelines/example-google-gke-kubectl-run/src/eb38fb8f620c734fddfb844e6af7e250c1ace617/bitbucket-pipelines.yml#lines-20) , [similar question](https://community.atlassian.com/t5/Bitbucket-questions/replace-the-image-value-in-kubernetes-yaml/qaq-p/1756883#M70004)

Regards, Igor.


Tags: bitbucket-pipelines

bitbucket-cloud

cloud

docker

helm
Can I add azure AD Groups in bitbucket ?
Asked by Sandeep Kumar:

Instead of inviting single single user can I add azure AD group to bitbucket.


Answers:
author: Caroline R
body: Hi, [@Sandeep Kumar](/t5/user/viewprofilepage/user-id/4286759), thank you for reaching out to Atlassian Community.

Currently, user provisioning for Bitbucket Cloud from external sources such as Azure AD is not available. However, we do have this on our [roadmap](https://www.atlassian.com/roadmap/cloud?selectedProduct=bitbucket&search=) for FY23. In addition to this, we are tracking this feature here:

* <https://jira.atlassian.com/browse/ACCESS-621>

I would suggest that you add your vote there (by selecting the **Vote for this issue** link) as the number of votes helps the development team and product managers better understand the demand for new features.

You are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the **Start watching this issue** link) if you'd like to get notified via email on updates.

Implementation of new features is done as per our policy [here](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html) and any updates will be posted in the feature request.

Besides that, I would like to share with you that we have a **group** API endpoint available, which you can use to add the users to groups programmatically, so you could make a custom script to call this endpoint and add **users in bulk**.

A member of our support team helped on building a python script that uses the **group's endpoint** to add members to a group in a workspace: [Add everyone to a group](https://community.atlassian.com/t5/Bitbucket-questions/Add-everyone-to-a-group/qaq-p/1914972), in case you would like to use it.

Please feel free to share any additional questions or concerns regarding this case.

Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud
Bitbucket Login problem
Asked by umitmert:

My teammate friend has email as \<email removed due to privacy reasons\>. He access [https://id.atlassian.com/login?application=bitbucket\&continue=https%3A%2F%2Fbitbucket.org%2Faccount%2Fsignin%2F%3FredirectCount%3D1%26next%3D%252F](https://id.atlassian.com/login?application=bitbucket&continue=https%3A%2F%2Fbitbucket.org%2Faccount%2Fsignin%2F%3FredirectCount%3D1%26next%3D%252F) url and is writing own email address.

But he receive anything email, click and click resend button, but he still receive anything email from bitbucket. Could you help me?


Answers:
author: Caroline R
body: Hi, [@umitmert](/t5/user/viewprofilepage/user-id/4715303), welcome to the community!

I checked our logs and confirmed that this email had a block on the server that prevented emails from being sent to them, so I removed this email from this suppression list.

Could you please ask them to try again and confirm if they receive the email now?

Kind regards,  
Caroline


Tags: bitbucket-cloud
clone PR branch of another repo during pipeline
Asked by Ekaterina Khrabrykh:

We have 2 bitbucket repositories, one of the repo (call it A) takes modules from another repo (B). We are developing both repositories at the same time. I want to add running unit tests for PR of project A. But I don't know how to check if there is PR in repo B. And if it exists, how to clone PR branch of repo B.   

<br />

My buggy solution is to take feature_branch if it exists, if not to take develop branch of repo B:

```
- b_repo_branch=${BITBUCKET_BRANCH}
- if [ -z $(git ls-remote ${B_REPO_URL} ${b_repo_branch}) ]; then b_repo_branch="develop"; fi
- git clone --branch ${b_repo_branch} ${B_REPO_URL}
- python3 -m pytest tests/
```

but it doesn't work when develop branches of both repos already have some crucial changes and there are no merging conflicts (PR is possible)  

Do you know how to know about pull requests of another repo during pipeline?   


Answers:
author: Igor Stoyanov
body: [@Ekaterina Khrabrykh](/t5/user/viewprofilepage/user-id/4492592) hi. Thanks for your question.  
For pull requests try to use [Bitbucket API Pull requests](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pullrequests/#api-pullrequests-selected-user-get)

Regards, Igor.


Tags: bitbucket-cloud

bitbucket-pipelines

cloud