youngmon/atlassian-qna huggingface dataset:
How to increment version when my plan executes?
Asked by Arpan Mehetre:

I have a c# library which gets build and published to our package repository through a bamboo plan each time we update it in Bitbucket.

I have a plan level variable "version = 1.0.0".

I want to be able to update the value of this variable every time the plan runs. It should -

* Pick up the existing version of library(e.g., 1.0.0 or 1.0.1 etc...)
* Increment it by 1(e.g., 1.0.2)
* And then this variable should be available for next task in the plan which is responsible for publishing the library to package repository

I have the task type - "Version Variable Incrementer" but there is not enough documentation(that I can find) on how to use that.

Please help. Thanks.


Answers:
author: Cristiano Mariano
body: Hi Arpan! How are you doing?

We did something similar to this using the variable ${bamboo.buildNumber}.

You could still have a variable called version with value 1.0 and pass "${bamboo.version}.${bamboo.buildNumber}" as a parameter to your tasks.

As this value will be the same during the entire build, you can use this expression anywhere you want, so you would't have to care about passing it between tasks.

Hope this helps!

Cristiano


Tags: variable

version
Installed BAMBOO on windows.
Asked by HCAZS:

Half way through configuring my VM restarts. Now my localhost:8085 is prompting me for creds. NO idea what my creds are. What do I do to resolve?


Answers:
author: Jeyanthan I
body: If it's a new installation, can you retry installing after deleting \<bamboo-home\> and \<bamboo-install\> directory?
Bamboo: PostgreSQL configuration in bamboo.cfg.xml - Which dialect?
Asked by Mark Wolff:

I just upgraded from Bamboo 5.9.7 to 6.4.1. I am getting some odd errors, so I am going through everything to see if I can find an issue.

In the "bamboo.cfg.xml" I have this line:

\<property name="hibernate.dialect"\>org.hibernate.dialect.PostgreSQL82Dialect\</property\>

As part of the upgrade, my IT guys upgraded PostgreSQL to a supported version (I believe we were on 9.1) So, I thought this "82" line might be out of date. Then I saw in the Bamboo 5.8 install notes, that the upgrade would change this to

    org.hibernate.dialect.PostgreSQLDialect

Since I was on 5.9, I should have already had this change, yes?

What should I be using with Bamboo 6.4.1 and PostgreSQL 9.6.8?


Answers:
author: Alexey Chystoprudov
body: org.hibernate.dialect.PostgreSQL82Dialect should be ok as it's default value for Postgres DB
Can I view last N build log lines?
Asked by Alexey Nezhdanov:

Our build logs are big and Bamboo truncates them with this message:

The build generated 90,790 lines of output.The output is too long and has been truncated to the last 1,000 lines. View live logs \| Download or view full build log

The problem is - the last 1000 lines are not enough - it usually captures only the tail of the problem, but to see the head of it I need something like last 2000-3000 lines.  
Downloading the file works, but that is some extra actions and viewing the log file in browser is very slow (5-10 minutes to render) due to the file size.  

Is it possible to view in browser last N build log lines, where N would be more than standard 1000, but still much less than the whole log file?


Answers:
author: Alexey Chystoprudov
body: 1000 lines is hardcoded value and can't be modified via settings

comments: author: Alexey Nezhdanov
body: Sure, I thought so. But that is not the only way to see the log - there are also two links - "Download or view full build log" - and these links do take HTTP query arguments. May be there is a query argument that limits the number of lines downloaded?


author: Alexey Chystoprudov
body: unfortunately.
Getting child plans of each parent plan in Bamboo via REST api?
Asked by Timoschenko Vadim:

Version of Bamboo is 6.4.0 rc1.

When we are using REST API request to get child plans of the parent plan, we are recieving the entire list of existing plans.

Example of request:  
http: // localhost: 8085 / bamboo / rest / api / latest / dependency / search / ESBDLV9-TEST / child? searchTerm =  
But in our case we would like to get only child plans. What would be the correct REST API call in our case?

For information here is the plan with dependencies from the Java specs view.  

@BambooSpec  
public class PlanSpec {  

public Plan plan () {  
Final Plan Plan = new Plan (new Project ()  
.oid (new BambooOid ("1113k510uyv42")))  
.key (new BambooKey ("ESBDLV9"))  
.name ("ESB deliveries 9.0")  
.description ("ESB deliveries 9.0"),  
"Test",  
new BambooKey ("TEST"))  
.......  
.triggers (new RepositoryPollingTrigger ())  
.planBranchManagement (new PlanBranchManagement ()  
.delete (new BranchCleanup ())  
.notificationForCommitters ())  
.dependencies (new Dependencies ()  
.childPlans (new PlanIdentifier ("ESB9", "IBPORTAL9"),  
new PlanIdentifier ("ESB9", "BSCASHDESK")))  
.forceStopHungBuilds ();  
return plan;  
}  

public PlanPermissions planPermission () {  
final PlanPermissions planPermission = new PlanPermissions (new PlanIdentifier ("ESBDLV9", "TEST"))  
.permissions (new Permissions ()  

........  
return planPermission;  
}  

public static void main (String ... argv) {  
// By default credentials are read from the '.credentials' file.  
BambooServer bambooServer = new BambooServer ("http: // localhost: 8080 / bamboo");  
final PlanSpec planSpec = new PlanSpec ();  

final Plan plan = planSpec.plan ();  
bambooServer.publish (plan);  

final PlanPermissions planPermission = planSpec.planPermission ();  
bambooServer.publish (planPermission);  
}  
}


Answers:
author: robhit
body: Hi Timoschenko,

Thanks for your question!

The reason you are getting the entire list of the plans is that the API response is expected to give all plans that would be available to use as a child dependency.

So if we don't specify a search term, then all plans that are available to use as a child dependency will be returned.

For your specific requirement, there is already an open feature request which you can access here - <https://jira.atlassian.com/browse/BAM-18429>

Thanks,

Robhit

comments: author: Timoschenko Vadim
body: Hi Robhit,

I have child build that is called "ESBDLV9-ATEST".

How can I compose the API call in order to get the last parent build name as the screenshot below.

How to use searchTerm correctly.

![parentbuild.png](https://community.atlassian.com/t5/image/serverpage/image-id/18893iB4455E030028821C/image-size/large?v=v2&px=999 "parentbuild.png")


Tags: atl-dev

dependency

rest

rest-api
How to run NUnit tests for a .NET Core project?
Asked by shaulbehr:

We have a .NET Core 2.1 unit test project, which contains a battery of NUnit tests. We are using NUnit 3.10.1.

Unfortunately, [NUnit Console does not yet support .NET Core projects](https://github.com/nunit/nunit-console/issues/392). So the only way to run tests in Bamboo is to use the \`dotnet test\` command.

So I tried doing that by running it as a command in the Bamboo build, and it does indeed run, but when it fails, it just says that the step failed, without specifying which tests caused it to fail.

I presume there's supposed to be an output file that Bamboo can read to get the test results. So how should I set this up so that I can see the test results?


Answers:
author: robhit
body: Hi Shaul,

Thanks for your question!

Since you are using command the Bamboo will only show that the command failed (task) which is indeed based on the return code from the command. I am thinking of using it with the debug flag to get more information when this command is run.

Honestly, I do not have any dotnet code to test. Let me know if that works.

Thanks,

Robhit

comments: author: shaulbehr
body: Hi Robhit,

I don't understand your suggestion.

How do you recommend I set up my unit tests to run so that I can see the detailed results of which tests failed?

Shaul


Tags: .net

jira-core

nunit
Problems with encoding Bamboo
Asked by Aleksandra Maslennikova:

Hello.

There is a instruction:

<https://confluence.atlassian.com/bamkb/how-to-change-the-wrong-encoding-in-bamboo-that-is-causing-the-application-to-crash-318670134.html>

I can't find file conf/wrapper.conf in Windows OS.

Where is it?

Thanks


Answers:
author: Ellie Z _they_them_
body: Hi Aleksandra,

Thanks for reaching out to the Atlassian Community!

If you're using Bamboo 5.1.0 or above, and running Bamboo from the Console, you'll want to put the variables into

```
<bamboo-install>\bin\setenv.bat
```

This is commonly in a location such as

```
C:\Program Files\Bamboo\bin\setenv.bat
```

Before Bamboo 6.2.0, the variable would look like this:

```
JVM_SUPPORT_RECOMMENDED_ARGS="-Dfile.encoding=utf-8 -Dsun.jnu.encoding=utf-8"
```

For Bamboo 6.2.0 and above, it would be like this:

```
: ${JVM_SUPPORT_RECOMMENDED_ARGS:="-Dfile.encoding=utf-8 -Dsun.jnu.encoding=utf-8"}
```

However, if you are running Bamboo as a Service, you'll need to use the Tomcat Service properties to do this. Instructions to do this would be in the following documentation:

[Configuring your system properties](https://confluence.atlassian.com/bamboo/configuring-your-system-properties-289277345.html)

In this case, please be sure to add each of the parameters on its own line, as described in the article linked above.

I hope this helps you get Bamboo running on the correct encoding!

Cheers,

Elias \| Bamboo Support

comments: author: Aleksandra Maslennikova
body: Elias,

Thank you for your help


author: Ellie Z _they_them_
body: Hi Aleksandra!

You are most welcome! If this solution helped you, may I ask that you please mark this answer as "Accepted" by clicking on the check mark? This will allow other users to find this post easier.

Thanks again for reaching out to us!

Best,  
Elias \| Bamboo Support
getRepository() is removed in Bamboo 6.3.2
Asked by nimantha:

We have updated our bamboo version from **5.8.0** to **6.3.2** and a number of deprecations and removals in the API has affected our plugin codebase. A specific code segment needs to be upgraded and we haven't been able to figure out how. The basic requirement is to get the changes between two bamboo builds.

```
private TaskContext taskContext;

??? private String selectedRepoId;

?

??? public VcsRevision(TaskContext taskContext, String selectedRepoId) {

??????? this.taskContext = taskContext;

??????? this.selectedRepoId = selectedRepoId;

??? }

?

??? public String getRevisionIdentifier() throws TaskException {

??????? String planKey = taskContext.getBuildContext().getPlanKey();

??????? RepositoryDefinition selectedRepoDef = getSelectedRepositoryDefinition(selectedRepoId); // RepositoryDefinition has been upgraded to PlanRepositoryDefinition

?

??????? String repositoryName = selectedRepoDef.getName();

?

??????? BuildRepositoryChanges bc;

??????? try {

??????????? bc = selectedRepoDef.getRepository().collectChangesSinceLastBuild(planKey, null);

??????? } catch (RepositoryException e) {

?

??????? }

?

??????? return String.format(REVISION_ID, repositoryName, bc.getVcsRevisionKey());

??? }
```

RepositoryDefinition has been updated to PlanRepositoryDefinition, (as per [https://docs.atlassian.com/atlassian-bamboo/6.3.2/deprecated-list.html](https://docs.atlassian.com/atlassian-bamboo/6.3.1/deprecated-list.html) ) and unlike RepositoryDefinition it does not have a getRepository() method.

Is there a way to replace the above or an alternative to the now unavailable getRepository().collectChangesSinceLastBuild(planKey, null) ?


Answers:
author: Marcin Gardias
body: return String.format(REVISION_ID, repositoryName, getBuildContext().getBuildChanges().getVcsRevisionKey(selectedRepoId));

comments: author: Nimantha Samarasinghe
body: This worked. Thank you!


Tags: app

bamboo-development

development
Bamboo cannot read password for BitBucket user in Build Plan
Asked by Mineplex League:

Hello! Please forgive my ignorance as I'm fairly new to Bamboo \& BitBucket. Any resources you can provide to help answer this question would be great.

I've configured a build plan in Bamboo to issue a \`git pull\` command once a BitBucket repo is updated. I've ran the build a few times now, and it fails every time because it cannot read the password to my BitBucket user.

```
fatal: could not read Password for 'https://user@git.site.com': No such device or address
```

Everything else in the plan seems to run fine. Any suggestions for how I could fix this?

Thank you in advance!


Answers:
author: Jeyanthan I
body: Hi,

If your intention is to just trigger a build soon after a new commit is made on Bitbucket repository, you would have to add that Bitbucket repository as a [Linked repository](https://confluence.atlassian.com/bamboo/linking-to-source-code-repositories-671089223.html) in your plan and then [configure Triggers](https://confluence.atlassian.com/bamboo/repository-triggers-the-build-when-changes-are-committed-289276902.html), so that a new build is triggered when changes are committed.


Tags: developer
Does security advisory apply to Bamboo remote agent?
Asked by Kylie Lunghusen:

We are running Bamboo 5.9.9 on Linux, with remote agents running on both Linux and Windows. The recent security advisory CVE-2018-5224 says the vulnerability only affects those "using Bamboo Server on Windows" for the affected versions. This sounds like the remote agent on Windows should be un-affected, since Bamboo Server proper is running on Linux. Can anyone confirm? Thanks


Answers:
author: Christian Glockner
body: Hi Kylie,

My understanding is that this indeed only affects the server side of Bamboo, however the point is also kind of moot because remote agents will update automatically to match the version of the Bamboo server upon startup.

Cheers,

Christian

Premier Support Engineer

Atlassian


Tags: security
Get name of repository branch from Source Code Checkout task
Asked by UserName GoesHere:

A Stage in a Bamboo Build Plan contains a Source Code Checkout task which checks out code from one of the Bitbucket repository branches that is linked to the Bamboo Build Plan.

**What specifically do I need to type or do in order to get the name of the repository branch that was checked out by the *Source Code Checkout* task?**

I have typed

\`echo ${bamboo.planRepository.branchName}\`

in a subsequent Task inside the same Stage in the same Build Plan, but this just prints out the name of the default branchName for the entire Build Plan, which is different from the specific branch that was just checked out by the specific Source Code Checkout task about which I need information.


Answers:
author: Marcin Gardias
body: \`echo ${bamboo.planRepository.\<position\>.branchName}\`

\<position\> : position of the repository on plan's repository list (starting with 1 for default repo)

comments: author: UserName GoesHere
body: You did not answer the question.. The line of code you gave only supplies information about the Plan-level links to repositories. By contrast, this question asks how to determine which of those repositories is checked out by a specific Source Code Checkout task in the specific Job. My question assumes you do not already know the answer. Your reply assumes that the script already knows the answer because if the script knows the value of the \<position\> variable, then the script practically knows the rest of the answer.

Can you suggest an approach that utilizes Job-and-Task-level variables?
Upgraded Bamboo 6.2.2 to 6.4 and lost all my pipeline data after failure.
Asked by Andr?-Vincent Boivin:

I have an old server snapshot which I restored to that had some of my old data.

I screwed up really bad now I want to know what's salvageable from my 6.2.2 snapshot to the new 6.4 version.

I think there's a lot of missing data in the old snapshot, I'm quite lost as what to do next... I wish bamboo would have just updated instead of deleting all my data and breaking down in such a dramatic way.


Answers:
author: Andr?-Vincent Boivin
body: Alright,

So here's what happened in all the glorious details

Starts with me, receiving and e-mail from atlassian saying if you have a bamboo server facing the internet, running on windows and running a specific version you're open to a vulnerability.

As we fit in that description I download the 6.4.1 version installer and run it.

It asks if I want to update, I simply click yes. I'm not familiar with bamboo at all as the only person in our company that set it up has now left.

```
could not delete C:\Program Files\Bamboo\atlassian-bamboo\WEB-INF\atlassian-bundled-plugins\activeobjects-plugin-1.2.3.jar
could not delete C:\Program Files\Bamboo\atlassian-bamboo\WEB-INF\atlassian-bundled-plugins\analytics-whitelist-3.39.jar
```

The above error messages come up during the update so I think I might as well cancel the update and go snapshot the server drives so I have a good restore point, but at this moment it already wasn't working.

The fix that had to be done was to re-install the 6.2.2 version and to point it to the right bamboo home. That worked flawlessly.

In hindsight, not a complicated fix but I really didn't knew what to expect from this software as it was my first time handling it.

Many thanks to the support representative who walked me through all the steps to get going again.


author: AnnWorley
body: Hi Andr?-Vincent,

I understand an upgrade of Bamboo from version 6.2.2 to 6.4 resulted in data loss. To help us take a closer look, I opened a support request on your behalf.

Please stand by for an email from our support portal.

Thanks,

Ann

comments: author: Andr?-Vincent Boivin
body: Thank you Ann,

I've spent the past 45 minutes trying to figure out what went wrong and I'm quite clueless as of how to fix this issue. Greatly appreciate the help offer.


author: AnnWorley
body: Hi Andr?-Vincent,

Do you have time to let us know what you and the Bamboo support engineer did during your screen share? It is not clear from the ticket, though it does look like the outcome was favorable.

Cheers,

Ann
how to change the default port number for ssh task to some other port number ?
Asked by NT:

the default port for SSH is 22 in ssh task created.

How can change it to some other port number.


Answers:
author: Jeyanthan I
body: You can certainly add a different port number in an [SSH task](https://confluence.atlassian.com/bamboo/using-the-ssh-task-in-bamboo-306348532.html). All you need to do is to click on **Advanced options** and enter your custom port under **Port** section.
Secondary Identity Provider - De-synced primary identity provider
Asked by Sam Dillon - ADM:

Hi,

We were configuring an identity provider through Azure AD, with 200 users synced through the primary identity provider ADFS on the same domain. The second identity provider was configured and syncing only 7 users.

The secondary identity provider then was updated to use different groups to sync users with, these were newly created groups in Azure. As soon as this was done **all** synced users were deactivated, even the administrators and now no one is able to sign into Atlassian, nor the admins to reconfigure this to fix.

I am unable to raise a support as I need to sign into my account, which I am unable to do.


Answers:
author: Sam Dillon - ADM
body: After searching, it appears to require the same resolution as the below. I really just need someone from Atlassian to see this and reactivate my account so I can reconfigure the identity provider for the organisation.

<https://community.atlassian.com/t5/Jira-Service-Management/My-Account-is-deactivated-suddenly/qaq-p/2299656#M131238>


Tags: cloud

jira-service-management

jira-service-management-cloud
Automation sending a link but I want to sent it as text
Asked by Vansh Jain:

Hi Team,  

I want to send a "Reply to Customer" message by sending the ticket number.   
I am using {{issue.key}} smart value of this use case, but this is sending a link to the customer which they cannot access.  

![waiting for customer.png](/t5/image/serverpage/image-id/312590iF2FBE5E804F065F7/image-size/large?v=v2&px=999 "waiting for customer.png")  

I just want to insert "GIS-42389" without any link.  
![comment.png](/t5/image/serverpage/image-id/312591i3128E8C823CA26C7/image-size/large?v=v2&px=999 "comment.png")


Answers:
author: Rebekka Heilmann _viadee_
body: Hi [@Vansh Jain](/t5/user/viewprofilepage/user-id/5411939)

have you tried creating a variable with the value of {{issue.key}} and referencing that?

Just a guess - I actually never noticed {{issue.key}} is transformed as a link. It might be that the view/portal is recognizing the pattern and will automatically interpret it as issue link rather than it being formatted as link right away.


Tags: automation

cloud

jira-service-management

jira-service-management-cloud

smart-value
Billing issue
Asked by Mystifly DevOps:

Hi Team,

account reactivation request. Case ID:- CA-2877983

Rehards

Arulraj S


Answers:
author: Ste Wright
body: Hi [@Mystifly DevOps](/t5/user/viewprofilepage/user-id/4020868)

You need to contact support for these requests - <https://support.atlassian.com/contact/#/>

I assume you already have based on the case ID?

Ste

comments: author: Mystifly DevOps
body: [@Ste Wright](/t5/user/viewprofilepage/user-id/1166470)

Yes Already I have raised case, but it's not been solved.

want to get addressed immediately.

Regards

Arulraj S


author: Ste Wright
body: Hi [@Mystifly DevOps](/t5/user/viewprofilepage/user-id/4020868)

How long ago did you raise the request?

Ste


author: Mystifly DevOps
body: hi [@Ste Wright](/t5/user/viewprofilepage/user-id/1166470)

it's been 2 hours no update


author: Ste Wright
body: Hi [@Mystifly DevOps](/t5/user/viewprofilepage/user-id/4020868)

You'll need to wait, 2 hours isn't that long.

Support timings are listed here, for reference - <https://confluence.atlassian.com/support/atlassian-support-offerings-193299636.html>

Ste


author: Mystifly DevOps
body: thanks [@Ste Wright](/t5/user/viewprofilepage/user-id/1166470) issue has been solved


Tags: cloud

jira-service-management

jira-service-management-cloud
Whenever a user creates or updates a Jira issue, notifications/emails are not being sent to the user
Asked by Parikshit Chaudhary:

Whenever a user creates or updates a Jira issue, notifications/emails are not sent to the user.

I tried sending a test mail to myself using the outgoing mail, but I received an error saying "Authentication Failed Exception: 535 5.7.8 Authentication credentials invalid.". I asked the client if they had changed the password, but they said that they hadn't made any changes to the password.


Answers:
author: Ste Wright
body: Hi [@Parikshit Chaudhary](/t5/user/viewprofilepage/user-id/5231967)

You've listed this as a Server/DC environment (i.e on-prem) - is that correct?

For Server there's a few different reasons this can happen. This Knowledge Base article is a good starting point: <https://confluence.atlassian.com/jirakb/troubleshoot-notifications-in-jira-203394737.html>

Let us know if any of these options help troubleshoot!

Ste

comments: author: Parikshit Chaudhary
body: Thanks, [@Ste Wright](/t5/user/viewprofilepage/user-id/1166470) for your prompt response.  

I've tried to test the outgoing mail by sending test mail, but I'm getting the same error: "Authentication Failed Exception: 535 5.7.8 Authentication credentials invalid."  

<br />

Will try to check the KB article. Meanwhile, if you have any suggestions, kindly share them with us.  

Thanks \& Regards,

Parikshit


author: Ste Wright
body: Hi [@Parikshit Chaudhary](/t5/user/viewprofilepage/user-id/5231967)

There's other posts on the Community which might help also with that specific error.

For example, see this one: <https://community.atlassian.com/t5/Jira-Software-questions/535-Authentication-Credentials-Invalid-Jira-SES-integration/qaq-p/1493844>

Ste


Tags: jira-service-management

jira-service-management-server

server