youngmon/atlassian-qna huggingface dataset:
How to trigger a build and pass in a bamboo global variable
Asked by lance_lyons:

Hi,

We have some builds that finish up and are checked into svn with a version (2.00.00.052). We would like to trigger a deploy of that build by calling the deploy project and setting the deploy.buildnumber variable to 2.00.00.052)

Is there a way to trigger a deploy with RESTful API passing in the deploy.buildnumber=2.00.00.052 value?

I am able to do this with teamcity but cant figure out how to do this with Bamboo.

We tried to have the deploy part of the build project and created a deploy stage but that has problems as well based on Bamboo pulling the repositories before it executes the various jobs in the stages.

Please dont answer about generic triggering of other builds... it has to involve passing the deploy.buildnumber to the other deploy project.

Thanks in advance.


Answers:
author: lance_lyons
body: That is what I did. I pushed the full release number (2.00.00.052) to a buildnumber.txt file, then shared it, did an artifact download on the dependent deploy project and read in the new buildnumber to deploy.

Thanks


author: Alex Soto
body: I think my answer to your other question applies here:

<https://answers.atlassian.com/questions/17440053/answers/17893142>


Tags: bamboo-administration
When are repositories for jobs/stages pulled in Bamboo
Asked by lance_lyons:

We have a build project that has for jobs in 2 stages.

stage 1

checkout source and build and check in website code (ie, build 2.00.00.052 is checked in)

2. checkout source and build and check in db migration updates (ie, migration script folder 2.00.00.052 is checked in

deploy stage

pull down the build 2.00.00.052 via nant and deploy to QA web servers

2. pull down the repository that holds all migration scripts (ie, 2.00.00.049, .050, .051, and suppose to be new .052)

apply the appropriate migration scripts to qa in order (.49, .50, .51 and the supposed to be .052)

Our problem is that it appears like the repositories for deploy stage step 2 do not contain the new checked in migration scripts created in stage 1, step 2.

Its almost like the repositories are pulled down for all stages, before the stages actually run.

Is this a true statement?

how do we force bamboo to pull the repositories just before the job runs like it is configured?


Answers:
author: Alex Soto
body: Here's what I do that sounds similar to what you want.

I generate an artifact in my build and use deployment plans. The artifact(s) can contain anything you want since you generate the file. You could create the file with the build number. Then your deployment will have that artifact available which you can read programmatically or pass in as an input to a script.


author: lance_lyons
body: Thats what I did. I pushed the full release number (2.00.00.052) to a buildnumber.txt file, then shared it, did an artifact download on the dependent deploy project and read in the new buildnumber to deploy.

Thanks


author: lance_lyons
body: Heather, thanks for responding, I dont mind doing that but how do I transfer the build number that we are using from the first build (eg, 2.00.00.052) to the dependent project as a variable deploy.buildnumber?

Any thoughts on that?

We originally had separate plans but couldnt get the build number from one plan to the other.


author: Heather Mardis
body: My understanding of the checkout source task across multiple stages in the same plan is that bamboo guarantees each source checkout of the same repo will use the same sha1 (or version).

I would recommend if you need the version of source to be different, then create your second stage as a dependent build plan so that is runs as a separate plan, rather than a second stage in the first plan.

Alternatively, you can add a command or inline script after the sourcecode checkout to run your update to pick up the checkins from the first stage.

comments: author: lance_lyons
body: It looks like even if the second stage is made into a dependency build it still pulls the head version info at the begining of the build chain. I actually have to completely separate the build from the deploy


Tags: bamboo-administration
do i need my own ec2 for .net 4.5 applications?
Asked by bruce dean:

Do I need to create my own, private EC2 instance to support building a .NET 4.5 application with Bamboo? I see that the related BAM-12013 BAM-12103 <https://jira.atlassian.com/browse/BAM-12103> is a 3-year old Improvement request that has not been updated in a while, but can't find anything else to definitively answer this question. If I can get around creating my own EC2 instance and use what Bamboo provides automatically, I would prefer to do that.

So, is there a Bamboo-provided solution?

thanks,

bruce


Answers:
author: rstephens
body: Okay, that makes a lot more sense. One alternative approach that you could consider is that you could install the .NET 4.5 SDK on the agent as part of your build process.

Also, I'll see if I can follow up that ticket for you, and update this post.


author: bruce dean
body: Here is the issue: <https://jira.atlassian.com/browse/BAM-12103> I had the number wrong.

I have an AWS account. I have hooked Bamboo Cloud up to it. But the EC2 instance that it spins up does not have .NET 4.5, so I am thinking that I need to create my own custom elastic image (<https://confluence.atlassian.com/display/BAMBOO041/Creating+a+custom+elastic+image+-+Windows>). Which is daunting...But I'm working on it.

My question is, do I really need to create a custom elastic image, or is there some way to build a .NET 4.5 application using pre-defined elastic images?

thanks,

bruce


author: rstephens
body: Hi Bruce,

At present Bamboo Cloud requires that you configure your own AWS account. Bamboo Cloud works on a model of spinning up EC2 instances on demand and shutting them down when they are not needed.

Also, the issue you mentioned doesn't appear to exit?

-Richard


author: Timothy
body: You'll probably need to confirm that Bamboo Cloud is not running on a Windows plat. If yes, you'll probably need to spin up an remote agent for work to begin.


Tags: cloud
Any best practices for integrated use of svn and bamboo ?
Asked by sandhya:

Please any one can provide the Steps for SVN integration with Bamboo


Answers:
author: rsperafico
body: Hello Sandhya,

Thank you for your question.

Please, refer to [Linking to source code repositories - Subversion](https://confluence.atlassian.com/display/BAMBOO/Subversion) documentation for further information.

If you find this answer useful, I would kindly ask you to accept it so the same will be visible to others who might be facing the same issue you have inquired.

Thank you for your understanding.

---

Kind regards,  
Rafael P. Sperafico  
Atlassian Support


Tags: bamboo-administration
Restrict EC2 Security Group Ports and IP Addresses
Asked by Neil Wheeler:

Hi,

The default security group that bamboo ondemand creates called elasticbamboo has the following inbound settings;

|      Type      |  Protocol   |  Port Range   |            Source             |
|----------------|-------------|---------------|-------------------------------|
| RDP SSH Custom | TCP TCP TCP | 3389 22 26224 | 0.0.0.0/0 0.0.0.0/0 0.0.0.0/0 |

I have a couple of questions;

1. I understand 26224 is used for communication with bamboo, could we restrict the source ip range to only include the ip address range for the bamboo ondemand servers? If yes, could someone provide the ip address range?
2. Does a windows server running bamboo agent need to use port 22? Or is that included for SSH to Linux servers?
3. I presume deleting 3389 is not an issue (assuming we dont want to RDP to the servers ever)?

Thanks.


Answers:
author: Przemek Bruski
body: 1. Yes. <https://confluence.atlassian.com/display/Cloud/Database+and+IP+information>
2. Windows 2012 image has SSH. 2008 does not.
3. You can delete both SSH and RDP if you want to.

comments: author: Neil Wheeler
body: Wow thanks for the speedy answer!


Tags: aws

cloud

security
ssh keys
Asked by Ashish Yadav:

If I integrate my Bamboo instance with STASH via application links, do I still need to setup/exchange ssh keys for each of my Projects and/or repos in STASH with Bamboo?

<https://confluence.atlassian.com/display/BAMBOO/Git>


Answers:
author: Timothy
body: No. If you Application Link between Bamboo and Stash, Bamboo will automatically create the keys needed for the Bamboo plan to talk to the Stash repo

comments: author: Krystian Brazulewicz
body: Requirement then is to use "Stash" repository type and not plain "Git"


Tags: bamboo-administration
Is it possible to pass different variables to different jobs in a stage?
Asked by ambicashri shetty:


Answers:
author: Caley Goff
body: The answer from Krystian is not entirely true. I do this all day everyday.

I create a variable in job1 in stage1, populate that variable, in job1, echo its contents to a text file. Save that text file in job1 in a tar file. I share that tar file in stage1 as an artifact, and make it available to all stages downstream.

The stages downstream untar that tar, cat the file, populate a new VAR with its contents, and suddenly you've shared a VAR between jobs and stages.

comments: author: Marcin Gardias
body: For the record, with Bamboo 5.7 and later there's a slightly easier method: Variable Inject Task has an option to create a 'result' variable(s), which does the same thing, but without need to play with the artifacts.


author: Caley Goff
body: AWESOME good to know I'll take look into this new feature!!!


author: Krystian Brazulewicz
body: No. Bamboo offers global and plan variables. Maybe you can simply create another plan?
How do you get a BitBucket pull request to trigger a Bamboo build?
Asked by Derek Rosenzweig:

I am developing a workflow using BitBucket and Bamboo, and can't for the life of me figure out how to tell Bamboo to create plan branches on a pull request. In fact, I see nothing at all in Bamboo Build plans about pull requests. I am able to get Bamboo to respond to a general commit on a matching plan branch, but we want our developers to do a code review and create a PR rather than having Bamboo handle auto-merging at that point. How are PRs generally handled in Bamboo? Is there a better way to do it?


Answers:
author: cbenard1
body: Hi Derek,

Currently Bamboo doesn't handle pull requests very well (or at all honestly). Here is the existing feature request to get this functionality into Bamboo: <https://jira.atlassian.com/browse/BAM-14844>  

Until that functionality has been baked into Bamboo the only workaround would be to write a plugin or API tool yourself.  
Apologies that a better solution isn't available at this time!

Thanks

Turner

comments: author: Derek Rosenzweig
body: Is there a recommended workflow for CI/CD using BitBucket and Bamboo?


author: Derek Rosenzweig
body: We're using this to build, test, and deploy a PHP web application (Magento)


author: Roger Barnes
body: There have been some recent developments on this front. Bamboo 6.0 is able to trigger build in response to pull request create and update events. It can also be configured to create the theoretical merge of the source and target branches before building, increasing the chances of catching an integration problem.

comments: author: Shane Corbin
body: Can you provide a link to any documentation on this? I'd like to explore this as a possibility.


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


author: Anuar Mamede Neto
body: Hi, I simply set the bamboo build plan to check for commits at an specific branch, so when o merge the pull request it triggers the build.

comments: author: Ashvin Narayanan
body: [@Anuar Mamede Neto](/t5/user/viewprofilepage/user-id/878363) I think you may have misunderstood the requirement here. The requirement is to trigger a build on PR creation, not once it's merged.


author: Ignacio Flores
body: [@Anuar Mamede Neto](/t5/user/viewprofilepage/user-id/878363) did you manage to figure this out ?


author: Ignacio Flores
body: Sorry, was for [@Ashvin Narayanan](/t5/user/viewprofilepage/user-id/2336137)


author: Anuar Mamede Neto
body: As [@Ashvin Narayanan](/t5/user/viewprofilepage/user-id/2336137) said, I misunderstood.  
So, no, I have not figured it out.


author: Prashanth Charlie
body: [@Ashvin Narayanan](/t5/user/viewprofilepage/user-id/2336137) hello sir did you get a solution for triggering a bamboo build after a pull request


Tags: bitbucket-cloud

cloud

continuous-delivery

pull-request
junit parser doesn't parse "system-out" element in test cases
Asked by Jinjing:

I have a test generating test reports in a junit xml format, and parsed by JUnit parser in Bamboo. But I found JUnit parser doesn't parse anything in "system-out" element in test cases.

The customized report I asked the script to generate is like the format in Bamboo documentation: <https://confluence.atlassian.com/display/BAMBOO/JUnit+parsing+in+Bamboo>

Does anyone have the same issue?


Answers:
author: Jinjing
body: I finally use the strategy @Krystian Brazulewicz suggested. I put all the information I want to see in test artifacts.

This workaround was also mentioned by <https://jira.atlassian.com/browse/BAM-782>. The shortcoming is also analysed.

However, it works very good for my specific case. Thanks!


author: martinda14
body: There are already issues asking for this rather fundamental feature:

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

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

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

In my case, Gradle produces JUnit reports with useful information in the system-out and system-err tags. It would help me considerably if Bamboo displayed that information like Jenkins does. It is one of the reasons I don't use Bamboo yet. The other is <https://jira.atlassian.com/browse/BAM-11205> (I need Bamboo to build Stash fork pull requests natively).


author: Krystian Brazulewicz
body: You can also try attaching report file as an artifact to your build and then investigate the reason for your failing build using this artifact.


author: Krystian Brazulewicz
body: This page describes what needs to be done to download Bamboo source code: <https://www.atlassian.com/software/bamboo/download>


author: Jinjing
body: Thanks a lot! @Krystian Brazulewicz

I need to dump a set of "name = value" parameters shown in the test result. Is there any way to do that?

I also tried put it in properties element, it seems Bamboo also doesn't parse properties either.

btw, could you tell me how to see Bamboo source code?

comments: author: Jan z Ond??kovic
body: Hi Man, I wrote my own JUNIT parser, which creates the output JUNIT-format (\*xml) file, and all \*\<property\>\* and \*\<system-out\>\* tags are not visible anywhere in Bamboo. So please let me know if you find any solution how to visualise them. Thanks, Jan.


author: Krystian Brazulewicz
body: Bamboo does not parse `system-out` element. If you're interested in details please see JunitTestResultsParser class in Bamboo source code.

If you believe that such feature would be useful please create an Improvement request in our [public bug tracker](https://jira.atlassian.com/browse/BAM).


Tags: bamboo-administration
xml validation
Asked by John Kirkilis:

In Bamboo, how would we implement XSD or DTD validation of an artifact produced by a stage? Can we create a script task that invokes xmllint or a Ruby or Java program that utilizes XML libraries?


Answers:
author: Timothy
body: Yes. Just use the Script Task (<https://confluence.atlassian.com/display/BAMBOO/Script>) to initiate the task.

comments: author: John Kirkilis
body: What would be the best way to ensure that detailed results could be rolled up and available to Bamboo besides just a pass-fail indication?


author: Timothy
body: What details? From the output from your question? Depends on what you want. Mostly going to be custom metadata from add ons. An example would be like this (<https://marketplace.atlassian.com/plugins/com.davidehringer.atlassian.bamboo.maven.maven-pom-parser-plugin>).
Can a build task report an error instead of a pass or fail result?
Asked by benbergman:

I have Bamboo configured to run builds every time new commits are detected in one of a few different repositories. For reasons that aren't very relevant for this question, we only want to run builds on the tip of master, so one of the first things we do is ensure our checkout point matches origin/master. If we have multiple people pushing code around the same time, we sometimes have builds that fail due to the checkout point not being origin/master. Currently these builds are being flagged as failures as they do not contain useful build artifacts, but they also don't typically contain any issues that need resolving as a new build will be triggered immediately after this one completes.

Is there a way to have a build register an error instead of a pass/fail so we can better identify when we have a real issue we need to deal with?


Answers:
author: Krystian Brazulewicz
body: Benajmin, does it mean that it is not possible to build your project/run tests from any revision but tip of the master? Removing this restriction seems like a way to fix the problem of your false failures.

Answering your question Bamboo has only 2 states for finished build: SUCCESS or FAILURE. We're not planning on adding any other states.

comments: author: benbergman
body: Thanks. I'll see if we can adjust some things to remove the restrictions. This is as good an excuse as any to massage things into proper shape. :)


Tags: bamboo-administration
Bamboo Maven compile scmBranch value is UNKNOWN
Asked by Pat Milligan:

For the maven-war-plugin and maven-jar-plugin, we'd like a MANIFEST.MF value showing the git branch used for the code checkout. The scmBranch variable is referenced, and this works for local builds. For Bamboo builds, the value is 'UNKNOWN'. Other customizations, like using the first 8 characters of the Stash git commit as the buildNumber value does work.

Why is the scmBranch variable value UNKNOWN for Bamboo builds?


Answers:
author: burtsevy
body: I have this issue when perform release with maven-release-plugin.
Why we need integrate Subversion with Bamboo ?
Asked by sandhya:

why we need to integrate svn to bamboo,plz any can tell about this integration in END User perspective way .

plz provide any articles or sites or books or any experience share with us as we are new to this .

plz share the information on this...it it would be great help full for me and my team.


Answers:
author: Nic Brough -Adaptavist-
body: You don't **need** to integrate it, but you probably want to. Start with the absolute basics

Bamboo is a build server at its heart. It exists to build software from code (although a lot of us do a lot more than just build the software), automatically, so that your developers are not spending ages doing their own builds in potentially non-standard ways.

Subversion is a source control system that you keep your code in.

So, "why you need to integrate them" is basically because you generally want to set up Bamboo to build code that is kept in Subversion.

I suspect there is more to your question, but once you understand the "why", you need to decide if that's what you want to do and then see how you can set it up.

comments: author: sandhya
body: thanks a lot Nic Brough,

things we are going to do

--------------------------------------

1. Migration from CVS to SVN
2. Integrating SVN to Bamboo
3. If we integrate with bamboo,what is the use ,and in what way we can use it.
4. Why we need Integration


author: Nic Brough -Adaptavist-
body: CVS to SVN migration is something a lot of people have done. Subversion was written because of inadequacies in CVS, so it's a pretty standard process.I've already explained why you might want Bamboo and Subversion integrated.


Tags: bamboo-administration
How do I execute a build artifact in an ensuing job
Asked by endiablado:

One of the artifacts that I am creating using bamboo is the unit test suite. I would like to execute it in another job on successful completion of the build. How would I do that?


Answers:
author: Alexey Chystoprudov
body: Hello John,

How would you run it without Bamboo? If it can be executed via some script command, then use Script task.
Build expiry is not working correctly for artifacts
Asked by Bharath Thummala:

<br />

Expiry logic we have defined: anything older than 14 days can be removed, unless it is tagged "final" or "saveme", with a minimum of 2 assets saved.

I have checked that some branches (e.g. OPL3-SBE8) are correctly deleting assets for builds older than 14 days, but it looks like OPL3-SBE3 and 4 are not working correctly.

[](https://community.atlassian.com/t5/Bamboo-questions/Build-expiry-is-not-working-correctly-for-artifacts/qaq-p/374694?attachment-id=12240){#link_116892f92e11b6}  
[](/tnckb94959/attachments/tnckb94959/bamboo-questions/11800/1/RE%20%20Bamboo%20builds%20%20OPL3-SBE3%20%20OPL3-SBE4.msg){#display_116892f92e11b6_0}


Answers:
author: Felipe Kraemer
body: Hi @Bharath,

It is not clear which Bamboo version you are running, but please keep in mind that Deployment release artifact expiry was added to Bamboo 5.7. Before that, only regular build artifacts could be deleted.

Can you please check if these artifacts that are not being deleted are really from regular builds, and not from deployments?

Kind regards,  
Felipe Kraemer


author: Alexey Chystoprudov
body: Hello Bharath,

It looks like support request which requires more investigation. Can you please create an issue at support.atlassian.com?
How to set up a Jira Support landing page for external clients?
Asked by Ayushi Patel:

Hey, my company is trying to setup a new jira support landing page for clients who are external guest, so basically when they have any issues they file out a form/ticket on that board. Does Jira offer anything like that, where we can build a support landing page with some field and share it with external users so they can only view their tickets.


Answers:
author: Marcus Jones
body: Hi and welcome to the community [@Ayushi Patel](/t5/user/viewprofilepage/user-id/5382561)

You'll need to be using Jira Service Management specifically. There will be a few things to do and also consider:

1) You first need to create a JSM project where your tickets will be created

2) You need to make sure the permissions at the global and project level allow for either login access for customers or anonymous access to your portal. You can go to your portal settings under your project settings and find the URL there.

3) Customize the portal - An admin will need to navigate to your portal where it can be branded and custom wording can be added.

4) Create your Request Types and add them to portal groups. Requests can also be hidden from the portal on a per request basis.

Here's an article that should help you navigate those steps [Set up and manage portal access \| Jira Service Management Cloud \| Atlassian Support](https://support.atlassian.com/jira-service-management-cloud/docs/set-up-and-manage-portal-access/)

comments: author: Ayushi Patel
body: Thank you, I appreciate your help.


Tags: cloud

jira-service-management

jira-service-management-cloud