youngmon/atlassian-qna huggingface dataset:
Create release via API via powershell
Asked by ????? ??????:

I am trying to achieve similar result as in <https://community.atlassian.com/t5/Bamboo-questions/API-Call-to-Create-Release/qaq-p/773999>

My Bamboo version is 6.9.2 build 60911.  
Here is the code:

First, I am getting all deployment environments attached to build plan via request:

```
Invoke-WebRequest -uri $($baseUrl + "/rest/api/latest/deploy/project/forPlan?planKey=$buildPlanKey") -Headers $authHeader -UseBasicParsing -ErrorAction Stop -Verbose;

```

Then, I select my deployment project id out of results to variable $deploymentId and check, if there is a release with my name present

```
Invoke-WebRequest -uri $($baseUrl + "/rest/api/latest/deploy/project/$deploymentId/versions") -Headers $authHeader -UseBasicParsing -ErrorAction Stop -Verbose;
```

If release with my name is not present - I wish to create it with following code

```
        $releaseData = @{            
planResultKey = $buildPlanKey            
name          = $BambooReleaseName        
};        

$json = $releaseData | ConvertTo-Json;

try {            
Invoke-RestMethod -Method Post -Body $json -Uri $($url + "/rest/api/latest/deploy/project/$deploymentId/version.json") -Headers $headers -ContentType "application/json" -Verbose;        
}        
catch 
{            
$result = $_.Exception.Response.GetResponseStream();
$reader = New-Object System.IO.StreamReader($result);
$reader.BaseStream.Position = 0;
$reader.DiscardBufferedData();
$reader.ReadToEnd(); 
}
```

But, at the end I get this:

```
{"errors":["Please provide a valid plan key"],"fieldErrors":{}}
```

However, as you can see by previous code - I am using valid plan key to retrieve deployment project. Why this error pops up? What am I doing wrong?


Answers:
author: ????? ??????
body: I found the reason - in json

```
$releaseData = @{            
planResultKey = $buildPlanKey            
name          = $BambooReleaseName        
};   
```

I need to pass valid build result, not build plan

So it should be

```
$releaseData = @{            
planResultKey = ${bamboo.buildResultKey}            
name          = $BambooReleaseName        
};   
```
Why does Bamboo return Jira tickets used in a different build plan?
Asked by Mark Erickson:

We have 3 build plans, Beta, Staging and Production. Each build plan is linked to a branch in a VSTS repository. We call the Bamboo API which returns the Jira tickets associated with the given build. Our last production build included not only Jira tickets for Production, but included Staging tickets as well. When you look at the production build details in Bamboo, you can see the associated Jira tickets split by build plan "Staging" and "Production".

The change sets were never merged into the production branch, so why does Bamboo think those changesets (and therefor the Jira tickets) are associated with production?

Thanks for any help!


Answers:
author: Gerhard Forster
body: Hi Mark,

Thanks for your question in Community.

It seems that indeed VSTS, so Visual Studio Team Services can work together with Bamboo Server, at least I found this link providing a HowTo for your reference: [VSTS and Atlassian Bamboo Integration](https://marketplace.visualstudio.com/items?itemName=ms-vsts.vss-services-bamboo&ssr=false#overview "VSTS and Atlassian Bamboo Integration").

Knowing that, let me get you some basic information about linking Jira issue keys to Bamboo build plans. It's nicely sketched in the following KB.

[Linking Jira application issues to a build](https://confluence.atlassian.com/bamboo/linking-jira-application-issues-to-a-build-289276957.html "Linking Jira application issues to a build")

So basically you can either *automatically* link Jira issue keys to a Bamboo build plan and that per **build comment** , via **build labe** l or per **commit message** and thus directly from out of your source code repository / your commit and push process. Or you *manually* link a Jira issue key to a build plan per Bamboo UI, as illustrated in the above KB.

I don't know which of both methods you are following, or perhaps a mix of both. However, whatever Jira issue you link to a Bamboo build plan, you should see that Jira issue showing up for this build. Or in other words, any Jira issue not linked should not show up for this plan.

That said, I'd suggest to cross-check your Jira issue linkage in Bamboo on base of the above KB and verify that you did not adds some Jira issue key accidentially.

Hope this helps.

Thanks, Gerhard


Tags: cloud

jira-software
Salesforce Development - Destructive Changes
Asked by Deepa Gs:

Hi Team,

May i request if you are aware of how to configure destructive changes in a Bamboo Plan.

Kind regards,

Deepa


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

Can you give some more details about "destructive changes"? What are these, do you have some examples maybe?

comments: author: Deepa Gs
body: Hi Victor, Thank you for replying. I am looking to create a Plan/Job in Bamboo to delete Salesforce components using ANT .I need help on how to configure so that when the Bamboo jobs are executed, Salesforce compoents are been removed from Sandbox.


author: Victor Debone
body: Thanks for the clarification Deepa!

To execute Ant with Bamboo you need to [configure a task](https://confluence.atlassian.com/bamboo/configuring-tasks-289277036.html) inside your plan job, using an [Ant task](https://confluence.atlassian.com/bamboo/ant-289277042.html). If the Ant task doesn't cover all your needs, you can always default to a [Script task](https://confluence.atlassian.com/bamboo/script-289277046.html), which will allow you to execute Ant exactly as you do on your local machine.

I hope this helps :)
How do I use bamboo to install an artifact
Asked by Stephen_DeBow:

We have a build plan that builds a couple installer .exe files. How do I download them from Bamboo and install them?

Thanks

\~Steve


Answers:
author: Lasse Langhorn
body: Hi [@Stephen_DeBow](/t5/user/viewprofilepage/user-id/3864587)

You should configure your artifacts for the build plan so it is possible to share these artifacts between job, build plans and deployment projects. It will make your setup much more flexible.

Try to look at this article: [Bamboo - artifact sharing.](https://confluence.atlassian.com/bamboo/sharing-artifacts-359400060.html)

You should also look at [Bamboo deployment projects](https://confluence.atlassian.com/bamboo/deployment-projects-338363438.html)

Hope this will get you further with your setup.

Regards

Lasse Langhorn


Tags: artefact

install
Why i am getting "StatusReason for not building is unknown"
Asked by FaheemUllah:

After restart of Bamboo some of our agents went offline and some plans are failing with status "Reason for not building is unknown". What may be the possible cause of this problem and how can we fix it?


Answers:
author: Gerhard Forster
body: Hello [@FaheemUllah](/t5/user/viewprofilepage/user-id/3587696),

That's really hard to say without any data at hand, it could practically be anything not even knowing what build you are running there.

As a first step, you should open your **failing build logs** and check out what warnings and error messages you spot there. They typically provide a first indication on what to look at next.

If the log messages are meaningful, you can directly act on them. Say the error claims something like "file missing", you may want to verify first if that file really exists, and if so, you may be concerned about the file's name or permissions on it.

If an error message is very specific you might google for it and check out user forums or Community sites to find out more about that.

Besides by creating a Bamboo [Support Zip](https://confluence.atlassian.com/support/create-a-support-zip-790796819.html "Support Zip"), you'll find your main Bamboo configuration files in that ZIP archive as well as your **Bamboo Server log** (*atlassian-bamboo.log* ) and your **Bamboo Tomcat log** (*catalina.out*).

Additionally, for remote agents, you find **agents logs** here:

* *\<Bamboo agent home directory\>/atlassian-bamboo-agent.log*
* *\<Bamboo agent home directory\>/logs/atlassian-bamboo.log*

Your **elastic Bamboo agent logs** you would receive per SCP, as described among a lot of further elastic agent information given, in the following KB.

* [Viewing an elastic instance](https://confluence.atlassian.com/bamboo/viewing-an-elastic-instance-289277134.html "Viewing an elastic instance")

You can grep any of these logs, depending on where you expect the error to occur and being logged out to and look for e.g. "fatal", "exception", "error".

As you see, there are many options to fish for an error. However, you may post a found error message to this thread and we might come up with further ideas for you.

Thanks, Gerhard
Bamboo server. How much I need local or remote agents?
Asked by Radovan_Bajic:

Hello,  
i am very new to using bamboo server. I am interested in how much I need local or remote agents. I need to work with .net core applications and some .net freamework 4.0 and 4.5.2 applications on windows server 2016 and windows 10


Answers:
author: Gerhard Forster
body: Just to add on what Lasse said above which is totally fine, there also exists the Mono project (<https://www.mono-project.com>) representing a cross-platform, open-source .NET framework that allows you developing .NET applications even on UNIX / Linux systems.

That said, by utilizing the Mono platform you might also be staying on a Linux running Bamboo Server or a local agent of that, or eventually a Linux remote agent, with Bamboo capabilities set as needed.

If not useful for you, this piece of information may be useful for other folks here in Community! At least I hope so.

Thanks, Gerhard

comments: author: Radovan_Bajic
body: Hi guys it is good to know. This is useful for me.


author: Lasse Langhorn
body: Thanks for sharing this.

Regards

Lasse Langhorn


author: Lasse Langhorn
body: Hi,

If your Bamboo server is installed on a Linux OS I would recommend you create a remote agent that has capabilities to build your .Net applications. A remote agent can be machine running Windows OS and it has the capabilities to build your .Net application.

If your Bamboo server is running on Windows you can define your capabilities for the local agent so it can build your .Net application.

Some resources to read:

* ++[Bamboo and .Net](https://confluence.atlassian.com/bamboo/getting-started-with-net-and-bamboo-289277288.html)++
* [Agents and capabilities](https://confluence.atlassian.com/bamboo/agents-and-capabilities-289277114.html)
* [Configuring capabilities](https://confluence.atlassian.com/bamboo/configuring-capabilities-289277148.html)

Hope this helps you get started.

Regards

Lasse Langhorn
Build fails with with error "Process 'Gradle Test Executor' finished with non-zero exit value 255"
Asked by Kira Resari:

Ever since Friday, our builds have been failing on Bamboo with the following error:

```
24-Apr-2020 12:28:33 FAILURE: Build failed with an exception.
24-Apr-2020 12:28:33 
24-Apr-2020 12:28:33 * What went wrong:
24-Apr-2020 12:28:33 Execution failed for task ':knight:test'.
24-Apr-2020 12:28:33 > Process 'Gradle Test Executor 2' finished with non-zero exit value 255
24-Apr-2020 12:28:33 This problem might be caused by incorrect test process configuration.
24-Apr-2020 12:28:33 Please refer to the test execution section in the User Manual at https://docs.gradle.org/6.1.1/userguide/java_testing.html#sec:test_execution
24-Apr-2020 12:28:33 
24-Apr-2020 12:28:33 * Try:
24-Apr-2020 12:28:33 Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
24-Apr-2020 12:28:33 
24-Apr-2020 12:28:33 * Get more help at https://help.gradle.org
```

However, absolutely nothing changed in the project since then. Running a build that passed before now fails. How can this happen?

Our only guess at this point is that something went wrong with the Bamboo configuration. We did some changes on Friday, including switching some projects to JDK 11, but reverted them after some branches started failing.

One branch still works, but we can't figure out what's different. We already tried switching the JDK versions back and forth, but so far without any success.

Could something external have changed then? In our build.gradle we use only versioned dependencies, so I don't think that could be the issue. But at this point, I don't really have any ideas what could be going wrong.

Any ideas or help would be greatly appreciated.


Answers:
author: Kira Resari
body: We managed to get it to work again by changing the actual build step from:

```
./gradlew clean build -d
```

To:

```
./gradlew clean build -d
./gradlew --stop
```

However, this still does not explain why it was working up until Friday. Any ideas?


Tags: gradle
Running Bamboo Server over AWS EC2 instance suddenly not respondin
Asked by Inam Alam:

I have setup Bamboo server over AWS EC2 instance using <https://confluence.atlassian.com/bamboo/running-bamboo-server-in-aws-858705568.html>

**Bamboo Server Setup**

*EC2 Instance Type* t2.small  
SSL Certificate is not installed as of yet

1. Server setup was all good  
2. Bamboo UI was working via EC2 instance public link  
3. Server SSH also working  
4. Installed following extra components to the EC2 Instance  
- Node 12 LTS  
- Docker  
- AWS CLI  
5. Once docker is installed need to give access to bamboo user for docker service else docker image will not be created via bamboo.

<https://confluence.atlassian.com/bamkb/docker-task-permission-denied-887749337.html>

6. Was able to set up my desired plan with required jobs  
- GIT code checkout via bitbucket repo  
- Script Command (npm install, other direct command)  
- Docker (running an image and performing some functionality as part of it)  
7. The build was working fine for many days

<br />

**Initial Issue**   
Identify issue related to memory,i.e. after a few days memory is all used. So investigated it out and identify that my Docker Image was creating Volumes which where dandling and not in use any more.  
So to fix it up and have removed all the dandling volumes and added another cleanup job as part of my bamboo plan to clean up docker dandling volumes.

After the above issue was fixed my Bamboo Server was working for a week or so and plan was processing successfully.

**Current Issue**   
Everything was working fine and we feel good with Bamboo, so wanted to move to purchased licence, which we did. But just before changing it to the server our Bamboo Server started behaving strangely.  
- Bamboo Server is not accessible via Public Link, just keep loading and server is not reachable  
- SSH to the server was also not working

Tried Following

1. Reboot instance from AWS EC2 Console but it was of no use
2. Stop and Start EC2 instance. After this, i could SSH to the instance but as i try to open Bamboo Ui via public link again its stuck and again cant ssh instance.  
   Tried the process again and reviewed logs, all the installed services, instance memory but everything looks fine.
3. Changed instance type to t2.large, but still saving behaviour as explained as part of 2

Not sure why its happening, would really appreciate if you could point out to potential issues so that i can try to fix it up.

- Inam Alam


Answers:
author: Santosh
body: Hi [@Inam Alam](/t5/user/viewprofilepage/user-id/3884051) where you able to resolve this issue?

What steps did you follow? Can you please share?


author: Kushaal Bafna P
body: Even I have the same issue not able to access bamboo page with ec2 public IP on default bamboo port 8085.

comments: author: Santosh
body: Hi [@Kushaal Bafna P](/t5/user/viewprofilepage/user-id/5083152) where you able to resolve this issue?

What steps did you follow? Can you please share?
Automations Vs Workflow Post functions
Asked by Anthony R:

My question is do Workflow post functions count as an "Automation".

My organisation is trying to find ways to reduce the number of automations we have and I'm thinking post functions might be an alternative.

E.g. One project team has an automation that copies the reporters email address to another field (for external reporting purposes) last month that automation ran more than 2000 times.

We're currently on a Standard plan so there has to be a better or more efficient way to do these things without biting into our automation quota limit.


Answers:
author: Hana Ku?erov?
body: Hi [@Anthony R](/t5/user/viewprofilepage/user-id/4291231) ,

no, workflow post functions don't count as an automation usage, see here:

<https://support.atlassian.com/cloud-automation/docs/how-is-my-usage-calculated/>


author: Sam Nadarajan
body: Hello [@Anthony R](/t5/user/viewprofilepage/user-id/4291231)

Workflow Post functions do not count as automation rule executions.

If you're looking to avoid hitting execution limits, there's marketplace applications available (JMWE, JSU Automation suite, etc).

More importantly, do you have multiple automation rules in the same project with the same trigger that do different things (i.e. 2 different automation rules that trigger when an issue is created but do 2 different things)? If so, maybe there's some opportunities to consolidate there and make automation rules more efficient!

comments: author: Anthony R
body: Thanks Sam,

Yes I'm currently looking at consolidating automations where possible I'm just looking for alternatives where practical.

We're also looking at the possible ROI of upgrading to premium but those discussions will take longer to progress.


author: Amelie Winkler _Appfire_
body: Hi [@Anthony R](/t5/user/viewprofilepage/user-id/4291231), as Sam and Hana mentioned, post functions don't count towards your executions. And if you want to circumvent the limits you could consider third-party apps (since they don't have limits).

If you need additional suggestions on how to optimize your existing automations, check out [his blog post](https://appf.re/AC-post), which provides concrete suggestions on consolidating rules, adjusting rule frequency, etc.

Additionally, there are a few similar community threads, like [this one](https://community.atlassian.com/t5/Automation-articles/6-Ways-To-Stay-Below-Your-Jira-Automation-Usage-Limits-A-Guide/ba-p/2582720), that could be helpful to you!


Tags: cloud

jira-service-management

jira-service-management-cloud
Jira Forms - Password Field
Asked by Shaun Neighbour:

Hi

I'm looking at creating a password change form for a low-security subset of our users. I appreciate that Jira is not designed to handle password resets, but I believe that my planned implementation will mitigate most risks, and that this would have a net benefit to the users involved.

At the moment, Jira Forms supports regex patterns , but not the following functions;

* A "Password" checkbox or dedicated field type to hide the password as it is typed.
* A match check, to ensure the value typed into two fields are identical.

Please can these be implemented ASAP?

Context for this request;

We have several thousand students, with accounts on multiple systems. We have API access to all of these systems, so have the ability to set the password on all. A script can easily read the password from a Jira ticket, replace the user entered Jira password field with another value, and then proceed to update all required system passwords with the collected value. All of this can happen within seconds of ticket creation.


Answers:
author: Fabian Lim
body: Hi [@Shaun Neighbour](/t5/user/viewprofilepage/user-id/3544977)

You can try this plugin: [https://marketplace.atlassian.com/apps/1212681/secure-fields-data-security-privacy?hosting=cloud\&tab=overview](https://marketplace.atlassian.com/apps/1212681/secure-fields-data-security-privacy?hosting=cloud&tab=overview) as Atlassian won't implement it as stated here: <https://jira.atlassian.com/browse/JSDCLOUD-204>

Regards,

Fabian

comments: author: Shaun Neighbour
body: Hi [@Fabian Lim](/t5/user/viewprofilepage/user-id/3131564)

For 14000 students, that would get pricey :(

I did see that response from 8 years ago. Hopefully they'll reconsider....


author: Fabian Lim
body: [@Shaun Neighbour](/t5/user/viewprofilepage/user-id/3544977) Remember, you only pay for the agents or JSW users. Requestors from the JSM portal are not counted. Unless the 14000 students are consuming JSW licenses...


author: Shaun Neighbour
body: Thanks. That plugin doesn't seem to add a password input field, that would hide the password as it was entered....


author: Joseph Chung Yin
body: [@Shaun Neighbour](/t5/user/viewprofilepage/user-id/3544977) -

I agreed with [@Fabian Lim](/t5/user/viewprofilepage/user-id/3131564) suggestion. To supplement his statements, I would highly recommend that you try alternative route on achieving your goal. Using Form to capture user's password is highly in-secure and not a proper way to handle user account pwd.

User password is unique at the account level and not at the application level. However application does validate user's account to give he/she access to the application.

In your env (company), there should be one single system that manages accounts and you should not rely on JSM to maintain the user account/pwd because this is not thing JSM was designed.

Best, Joseph Chung Yin


Tags: cloud

jira-service-management

jira-service-management-cloud
Integrating Customer Support(CS Level Escalation) Service Project with Dev Team Software project
Asked by Hamza Khan:

I want to integrate a Customer Service management board with a Dev Team board so I can escalate tickets(User bug reports / Issues) to the dev team board and get updates!  

<br />


Answers:
author: Fabian Lim
body: Hi [@Hamza Khan](/t5/user/viewprofilepage/user-id/5532198)

Welcome to the community!

If you want to create a new board, here are the instructions on how you can set a board. <https://www.atlassian.com/agile/tutorials/creating-your-agile-board>

What you need to do next is include the specific issues you want to bring from the JSM and Dev Team board into the JQL Filter board. You will have to make sure that the dev members have access to browse both the JSM and JSW projects.

I hope this helps.

Fabian


Tags: cloud

jira-service-management

jira-service-management-cloud