youngmon/atlassian-qna huggingface dataset:
Why does my CI build get an MSB4236 error?
Asked by David FALLAS:

A CI build on Windows 2012 server continues to fail with: 'error: MSB4236: The SDK 'Microsoft.NET.Sdk.Web' specified could not be found.'

.Net Core 2.0 is installed correctly - c:\\windows\\system32\> dotnet -- version returns 2.1.2

The Path environment variable contains both C:\\Program Files\\dotnet and C:\\Program Files\\dotnet\\sdk\\2.0.0\\Sdks - and the SDK is present at that location.

Why does the agent fail to find the SDK?

Bamboo v6.5.0


Answers:
author: Daniel Santos
body: Hi [@David FALLAS](/t5/user/viewprofilepage/user-id/551455),  

Let me share some troubleshooting tips that might help you moving forward:

1. First of all, check what part of the build is reporting this error:  
   **\*** What is the affected task?  
   **\*** It it is an script task, or a task that uses an external builder or script, check specifically what command is failing.
2. Try to run the same command or actions performed by that task from your agent server terminal (no Bamboo involvement).  
   **\*** If it works, we need to check if the environment variables for your agent are the same of your terminal.  
   **\*** If it is not working you know there to fix things.
3. Assuming your terminal works we need to know what is different when using Bamboo.  
   **\*** Check what are the environment variables from terminal in comparison with your agent JVM environment ones.  
   **\*\*** Use the command **SET** to check the environment variables in the terminal  
   **\*\*** Add a script task before the task failing in Bamboo to run the **SET** command. That will return the variables from inside the agent JVM. If the problem is here you will be able to check what is wrong.  
   **\*** Check if there is any capability missing in your server capabilities.
4. Check if this is working for other agents  
   **\*** if it is working, what is different?

Try to cross the build logs with the agent logs to identify more details of what is causing the issue.  
The agent logs can be found at:

* **\<Bamboo_Agent_Home\>/logs/atlassian-bamboo.log** (application logs)
* **\<Bamboo_Agent_Home\>/atlassian-bamboo-agent.log** (application logs + JVM logs)

comments: author: David FALLAS
body: Thank you Daniel - your response helped me investigate this in a more systematic way.

The underlying problem was due to changes to the path(s) to the MSBuild binaries and dependencies in the latest Microsoft Build Tools deployment. Some files that Bamboo could not find, and which were the root cause of my build problems, are now in C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\...

We only uncovered this after a number of other builds started to fail as well as my newly added one.


author: Daniel Santos
body: Hey David,

Great to hear!  
I'm glad you could find what was causing the issue and fix it.  

\\o/  


Tags: .net
Bamboo asking for license key
Asked by Tony Fontanilla:

I just upgraded Java on bamboo, as well as the JAVA_OPTS variable in the server config, as well as ran "flush hosts" on the database that bamboo connects to. This enabled the web page to come back up, but now it's going through the new setup process and asking for the license key. Why is it doing that?


Answers:
author: Daniel Santos
body: Hi Toni,

Usually, this happens because Bamboo is not finding its home directory or the home directory does not have the database configuration properly set. This scenario triggers the installation wizard so a new installation can be set.

If you had an installation working before and you want to restore it, you need to make sure:

1. You have the **\<Bamboo_Installation_Folder\>** with the Bamboo binaries from our website - [Download Bamboo - Atlassian](https://www.atlassian.com/software/bamboo/download)
2. The **\<Bamboo_Installation_Folder\>/atlassian-bamboo/WEB-INF/classes/bamboo-init.properties** is pointing to **\<Bamboo_Home_Folder\>**
3. Your **\<Bamboo_Home_Folder\>** is restored as it was before this issue
4. Your database is restored as it was before this issue

Explanation:

A Bamboo installation is composed of 3 main parts:

1. **\<Bamboo_Installation_Folder\>:** basically binaries and tomcat configuration
2. **\<Bamboo_Home_Folder\>:** general instance configuration (user management, database, AWS, URL, license, ...), build result logs, build working directory, repository caches, and others
3. **Database:** most of the Bamboo data is located here, everything that really needs to be persisted (plan configuration, build results, deployment configuration, deployment results, repository configuration, local users/groups)

The Bamboo process is started from the installation folder. It knows where is the home directory through the **\<Bamboo_Installation_Folder\>/atlassian-bamboo/WEB-INF/classes/bamboo-init.properties** file. Once the home directory is located, all the configurations set there can be loaded including the database details. This is how all three parts are connected.

In other words, if the Bamboo home directory is empty the installation wizard will be triggered so a new instance can be configured.


Tags: licence
Bamboo Notification MS Teams
Asked by Kristian Samuel:

Hi,

I'm looking for a plugin or a method so that I get notified when a build passed or fails however rather than just giving out the Fail/Pass message I would need the reason why it passed or failed instead so I'm lkking for something which display more info rather than:

Build # Failed

Bamboo Utility Belt ? Push start Notification (Test) ? #19 failed. Manual run by....

Build status update

Notified by Bamboo

Details

|-------------------|-------------------------|
| Responsible Users |                         |
| From              | Bambo Notification test |

Any ideas?

Thanks in advance.


Answers:
author: Danyal Iqbal
body: Copy notificationCommonsHtml.ftl to BAMBOO_HOME\\templates\\notification-templates

Look for this line:

\[#macro showFailingJobs buildSummary baseUrl\]

This is where it displays info about the failed jobs. I updated this section:

\[#if jobResult.failed\]  
\[@displayJobRow jobResult stageResult/\]  
\[#assign failingJob = true /\]  
\[#-- Added to show failed job error summary --\]  
\<tr\>  
\<td colspan="5"\>\<strong\>Error Summary:\</strong\>\<br/\>  
\[#list jobResult.extraBuildResultsData.buildErrors as error\]  
${error}\<br/\>  
\[/#list\]  
\</tr\>  
\[/#if\]

That adds the build summary error message after each failed job.

The API has changed a bit since the original response. The error data is now in ExtraBuildResultsData. Remember to restart Bamboo after you've edited the file.


Tags: notification
Options for spinning up another instance of Bamboo for POC work
Asked by Andrew Humphries:

Hi

I would like to know the options for spinning up an instance of Bamboo for POC work

I work in an environment where we do not have admin access to our windows based laptops, and have found that I am therefore unable to work with the trial version of bamboo I have downloaded. We have a self hosted instance of Bamboo at my company, which I do not want to interfere with as I do my POC work. Are there any trial options in the cloud at all ? From my research I've not been able to find any

thanks


Answers:
author: Alexey Chystoprudov
body: There's no cloud offering for Bamboo so you have several options:

- spin up Bamboo at AWS

- use Docker image, there're few unofficial images at DockerHub
Bamboo scp plugin hangs while uploading
Asked by melih arslan:

I have remote Bamboo Windows Agent on which build plans run successfully. Also I can copy files through command line using pscp.exe to the remote app servers.

However when it comes to run scp plugin in a deployment plan, deployment hangs in uploading state as you may see below.

![Screen Shot 2018-08-15 at 12.10.54.png](/t5/image/serverpage/image-id/29533i3390A6677BA45304/image-size/large?v=v2&px=999 "Screen Shot 2018-08-15 at 12.10.54.png")

What could be the possible root cause?


Answers:
author: melih arslan
body: Here is my scp task. I made blank host and username. Also there is no specific info on the target side.

![Screen Shot 2018-08-17 at 15.22.22.png](https://community.atlassian.com/t5/image/serverpage/image-id/29846i3F0DE2A3B918E235/image-dimensions/451x523?v=v2 "Screen Shot 2018-08-17 at 15.22.22.png")


author: melih arslan
body: Hi Kurt,

I am using username/password.

Should I use key based approach?

comments: author: Kurt Klinner
body: Don't think that it should make a difference.

Do you have by chance access to the ssh daemon logs on the target side to see if there is something reported. Can you provide the scp task config and the logs of that task?

Cheers

Kurt


author: Kurt Klinner
body: [@melih arslan](/t5/user/viewprofilepage/user-id/1741641)

Hi Melih,

are you using a username / password or keybased approach to copy the files?

BR

Kurt
ANT_HOME being overridden on Bamboo Remote Agent
Asked by Ryan Schaaf:

Having a weird issue with my Bamboo Remote Agents and ANT_HOME. The TL;DR - Is I have ANT_HOME set for the shell executing the remote agent, however bamboo appears to be overriding it with its own value when executing the ANT task:

The Configuration:

\> Bamboo Instance on an Amazon Linux EC2

\> Bamboo Remote Agent on Amazon Linux EC2

\> ant installed via AWS yum repo ( yum -y install ant )

The ant executable is installed in /usr/bin/ant , however the etc and lib directories are in /usr/share/ant.  

I installed the remote agent using an init.d wrapper, which looks like this:

```

 #!/bin/bash 

######################################################## 
# Wrapper script to execute the Bamboo Remote Agent 
# that lives at /opt/atlassian/application-data/bamboo-agent/bin/bamboo-agent.sh 
# chkconfig: 2345 20 80 
# description: Bamboo Remote Agent Wrapper 
######################################################## 
export RUN_AS_USER=bamboo

export ANT_HOME=/usr/share/ant/ 
export JAVA_HOME=/usr/lib/jvm/jre-1.8.0-openjdk.x86_64/ 
export BAMBOO_HOME=/opt/atlassian/bamboo/

exec "/opt/atlassian/application-data/bamboo-agent/bin/bamboo-agent.sh" "$@"
```

The agent launches and connects successfully. When trying to build using the Ant Task, we get the "Your ANT_HOME isn't set correctly" error of:

```
error	13-Aug-2018 14:04:04	Error: Could not find or load main class org.apache.tools.ant.launch.Launcher
```

I embedded a shell task to verify that the ANT_HOME is set in the wrapper of just  
\> echo Ant Home: ${ANT_HOME}  
And in the logs I see

```
build	13-Aug-2018 14:04:03	Ant Home: /usr/share/ant/
```

So according to this article: <https://confluence.atlassian.com/bamkb/cannot-execute-ant-builds-ant-does-not-launch-213524968.html> , I was expecting the remote agent to see ANT_HOME when launching and set it accordingly, but looking at the log for the Ant build task, I see it setting its own ANT_HOME:

```
using extra environment variables:
... etc
ANT_HOME=/usr
... etc
```

Ant works 100% fine as configured in any users bash shell, so this is definitely something with how bamboo is setting up the execution environment for the ant build task.

Any thoughts?


Answers:
author: Gonchik Tsymzhitov
body: Hi!

Have you fixed it ?

Cheers,

Gonchik Tsymzhitov
Skip Bamboo builds using commit message?
Asked by Eric Pederson:

We regularly have a need to skip running build(s) on certain commits. All of the major public cloud CI vendors support this by adding \[skip ci\] in the commit message ([Travis](https://docs.travis-ci.com/user/customizing-the-build/#skipping-a-build), [Appveyor](https://www.appveyor.com/docs/how-to/filtering-commits/#skip-directive-in-commit-message), [CircleCI](https://circleci.com/docs/2.0/skip-build/), [BuildKite](https://buildkite.com/docs/pipelines/ignoring-a-commit), etc). [Bitbucket Pipelines supports](https://confluence.atlassian.com/bitbucket/bitbucket-pipelines-faq-827104769.html) it. Jenkins supports it with a [plugin](https://wiki.jenkins.io/display/JENKINS/Commit+Skip+SCM+Behaviour).

How can we do this with Bamboo?


Answers:
author: Daniel Santos
body: Hi [@Eric Pederson](/t5/user/viewprofilepage/user-id/572547),

You can achieve this in Bamboo as well through the **Plan/linked repository settings** at:**![Linked_repositories_-_Atlassian_Bamboo.png](https://community.atlassian.com/t5/image/serverpage/image-id/29601i99BF9F95F08E185C/image-dimensions/595x165?v=v2 "Linked_repositories_-_Atlassian_Bamboo.png")**

If the regular expression in the **Exclude changesets**field matches the commit message, that commit will not trigger a build nor be tracked in Bamboo build results.

comments: author: Eric Pederson
body: That looks almost ideal, but..

I put "skip ci" (without the quotes) into **Exclude changesets** and added that to my commit comment (for example: "Re-apply 66714a9 (config syntax error message) skip ci" but it still ran the plans that had this as a linked repository.

I am using Bamboo 6.1.0.


author: Eric Pederson
body: Screenshots:

![2018-08-15 20_33_19-Linked repositories - IDB Bamboo.png](https://community.atlassian.com/t5/image/serverpage/image-id/29604iC4EEBB6632877E56/image-size/large?v=v2&px=999 "2018-08-15 20_33_19-Linked repositories - IDB Bamboo.png")

![2018-08-15 20_35_15-ZZ Build System - build.sh price 160_ Build result summary - IDB Bamboo.png](https://community.atlassian.com/t5/image/serverpage/image-id/29605i065BBE813E426AF1/image-size/large?v=v2&px=999 "2018-08-15 20_35_15-ZZ Build System - build.sh price 160_ Build result summary - IDB Bamboo.png")


author: Eric Pederson
body: Scratch that. This regex works:

```
.*skip ci.* 
```

Thanks!

Of course it would be nice to have something global so I didn't have to add this to my 50 or so repositories but I'm happy to have it.


author: Daniel Santos
body: Hi [@Eric Pederson](/t5/user/viewprofilepage/user-id/572547),

I'm glad you found the correct regex pattern to filter the commits =\]  
If you don't mind on accepting my answer above, that will help other community users to see that this question is solved.  

Thank you for sharing your configuration an tests! That helps a lot the community.


author: Eric Pederson
body: Done - thanks again!


author: Daniel Santos
body: Than you! =\]


Tags: bitbucket

server
Bamboo SSH Task - calling remote script that has switch user (su) fails silently
Asked by Judy Romano:

I have defined a SSH Task where the commands in the SSH Task input field are:  
source /home/myuser/.bash_profile  
cd /opt/app/myproject/build/TEST  
./deploy_something.sh

Inside the deploy_something.sh bash script, it needs to switch user to be able to start/stop a service (i.e. logstash) that is owned by a different user (i.e. elasticsearch):  
su - elasticsearch -s /bin/bash -c "$LOGSTASH_DIR/bin/logstash -f $LOGSTASH_PIPELINES \&" \> /dev/null 2\>\&1

This works great when running from within the remote server, but when called from Bamboo SSH task, it dies silently.

I've disabled the "requiretty" and "!visiblepw" configuration via visudo as discussed in <https://community.atlassian.com/t5/Answers-Developer-Questions/Execute-sudo-on-remote-agent/qaq-p/523834>, thinking it may be similar to a sudo issue. Does not solve the problem.

The Environment details are below:  
Bamboo Server: centos-release-6-9.el6.12.3.x86_64  
Remote Server: centos-release-6-8.el6.centos.12.3.x86_64

Anyone know a workaround or solution for this?

Thanks


Answers:
author: Edwin Kyalangalilwa
body: Hi [@Judy Romano](/t5/user/viewprofilepage/user-id/1798451),

Try running the command without

```
>/dev/null 2>&1
```

so you atleast see the output and issues that maybe happening in the remote server.

comments: author: Rodri Alvarez
body: Same issue here.


author: Manoj Dhungana
body: Same here ! No updates yet ?
Bamboo specific contexts for web-resources
Asked by Nikita Bedmutha:

Hi,

I need to use the jquery and chart.js as well as my custom js and css files on the View Report tab that is added in the Job specific result of my plugin. When using atl.general , it causes some jquery conflicts with the one that bamboo uses already. Hence currently not using any context and just use the webResourceManager.requireResource() to load particular resources.

When I switch to my custom Reports tab (besides Artifacts,Logs, Metadata) from Default Job results page; webResourceManager.requireResource() does not statically loads the required js/css. Need to expliciltly do Ctrl+Shft+R or reload to see the graphs and my custom report. So thought of using some other context. So what are different contexts that bamboo supports?

How can I fix this issue?


Answers:
author: Gonchik Tsymzhitov
body: Hi!

I hope the latest version 6.8.0 will easier customize it

<https://confluence.atlassian.com/bamboo/bamboo-releases-671089224.html>

Cheers,

Gonchik Tsymzhitov


Tags: web-resource
Bamboo creating plan, clears the fields
Asked by Development GGN:

Hi,

Any idea what might be wrong?

I am trying to create a new plan, but unfortunatly it seems to clear all the fields:

<https://community.atlassian.com/t5/Bamboo-questions/Creating-a-new-plan-in-bamboo-cleans-all-the-fields-and-returns/qaq-p/863655>

Kind Regards.


Answers:
author: Daniel Santos
body: Hi [@Development GGN](/t5/user/viewprofilepage/user-id/1764316),

Please refer to your first question for suggestions on troubleshooting. That one was selected because it contains a better description of the problem.

Thank you!
Invalid URL for BitBucket Cloud Webhook to Bamboo
Asked by Mike Hagesfeld:

When trying to set up our BitBucket webhook to Bamboo, I am getting "Invalid URL" when trying to save the Webhook initial setup. I am using the URL from the pattern posited in the Atlassian post: <https://confluence.atlassian.com/bamboo/triggering-a-bamboo-build-from-bitbucket-cloud-using-webhooks-873949130.html>

I have tried:

[http://10.3.2.23:8085/rest/triggers/1.0/remote/changeDetection?planKey=BAMTEST-BAMWEB\&skipBranches=false](http://10.3.2.23:8085/rest/triggers/1.0/remote/changeDetection?planKey=BAMTEST-BAMWEB&skipBranches=false)

Which results in "Invalid URL"

And when I try:

10.3.2.23:8085/rest/triggers/1.0/remote/changeDetection?planKey=BAMTEST-BAMWEB\&skipBranches=false

I get "The specified URL is invalid"

I have added the BitBucket IPs to the whitelist for the trigger in Bamboo.


Answers:
author: Daniel Santos
body: Hello Mike,

I've checked the errors you were experiencing and this is what they usually mean:  
**Invalid URL** : Domain unreachable. This error is misleading, it was reported as an enhancement but closed due to missing information - [#12533 - Urls that don't exist give unclear "invalid url" error - Bitbucket](https://bitbucket.org/site/master/issues/12533/urls-that-dont-exist-give-unclear-invalid). I've added some extra comments there to highlight this as an existing problem.  
**The specified URL is invalid**: The URL format is not valid.

Your Bamboo instance seems to be unavailable to the internet, in order words, Bitbucket is not able to reach your Bamboo server therefore not being able to configure the WebHook.

Please check if your instance is available by accessing it from a different machine, on an external network.

```
curl --user <user>:<password> -H "Content-Type: application/json" -X POST http://<your_IP>:8085/rest/triggers/1.0/remote/changeDetection?planKey=BAMTEST-BAMWEB&skipBranches=false
```

(!) Please make sure the IP calling Bamboo is configured in Trigger IP addresses remote trigger.

In case you need to whitelist a firewall to allow Bitbucket request to reach your server, please use the following pages as a reference:

* [What are the Bitbucket Cloud IP addresses I should use to configure my corporate firewall? - Atlassian Documentation](https://confluence.atlassian.com/bitbucket/what-are-the-bitbucket-cloud-ip-addresses-i-should-use-to-configure-my-corporate-firewall-343343385.html)
* [New outbound IP addresses for webhooks - Bitbucket Blog](https://blog.bitbucket.org/2017/06/21/new-outbound-ip-addresses-webhooks)

I hope that helps you to move forward.

comments: author: Mike Hagesfeld
body: Thank you - I was able to figure that out eventually, but could not find this information anywhere else (another answer to a different question triggered the "DUH!" moment that my local URL wouldn't be accessible via cloud bitbucket). A more informative message might be helpful.

Thanks for your assistance!

---Mike


Tags: bitbucket

bitbucket-cloud

cloud
How to find repositories linked to plans via REST API
Asked by Karel Vervaeke:

We're migrating several hunderd builds to Bamboo Specs. To do this we want to automate as much as possible, but we can't find out which repositories are linked to each plan via the REST API. Is there a way to find out which repositories are linked to each plan?


Answers:
author: Daniel Santos
body: Hi [@Karel Vervaeke](/t5/user/viewprofilepage/user-id/1770713),  

The answer to your question is in this community thread: [Bamboo REST API to retrieve repositories of the plan](https://community.atlassian.com/t5/Bamboo-questions/Bamboo-REST-API-to-retrieve-repositories-of-the-plan/qaq-p/795842)
Internal stakeholders in Standard Plan
Asked by giuseppe_corsello_nnamu_com:

Dear all,

I am having difficulties to add internal stakeholders to issues on Service Project. We have the Standard Plan and it is not clear if this is a functionality included on our plan or not.

When looking at this article no: <https://support.atlassian.com/jira-service-management-cloud/docs/how-can-i-add-and-manage-internal-stakeholders/>, but based on the pricing plan it seems yes: <https://www.atlassian.com/software/jira/service-management/pricing>

Could anyone please clarify?

Thank you,  
Giuseppe


Answers:
author: Walter Buggenhout
body: Hi [@giuseppe_corsello_nnamu_com](/t5/user/viewprofilepage/user-id/5440524),

As long as your internal stakeholders are licensed Jira users of another product (Jira Software, Jira Work Management), you can give them access to a Jira Service Management project. You don't have to pay an agent license for those users.

They will be able to see the issues in the project and even add internal comments to them, but they cannot interact with customers (via public comments), be the assignee, edit issues or log work against them.

Hope this helps!

comments: author: giuseppe_corsello_nnamu_com
body: Thank you Walter - super helpful! Do you know if I need to set-up anything on the Service Project in particular to allow stakeholders to be tagged on specific issues? Indeed, using the standard chat, I am not able to do it and I do not have the classical field called ?Stakeholder? when configuring the issue template

Not sure if there is anything I am missing


author: Walter Buggenhout
body: When they have a Jira license to another project, it should be possible to mention them using (@their_name).

If you want a stakeholder custom field, a Jira admin in your site should be able to add a *user* custom field with that field name and add it to the screen(s) used in your service project so you can add them.


Tags: cloud

jira-service-management

jira-service-management-cloud