youngmon/atlassian-qna huggingface dataset:
P5 Informational Notification
Asked by PR:

HI Guys,

we have a twice a day notification that sends out a weather forecast to our field workers.

Is there a way to 1) auto close the notification after it has been sent and 2) not to escalate the alert.

thanks


Answers:
author: connor mcguane
body: For 2) you should be able to modify your escalation policy in such a way that all it does is send to the first schedule, and thats it. After that for 1) the team can set up a Notification Policy to auto-close an alert after 1 minute.


Tags: cloud
Creating an email only alert level
Asked by Eric Sletten:

We've used OpsGenie for a few infrastructure teams for a couple of years but are now expanding it to development teams. It's worked well for us to use priorities as a general guideline of how aggressive to be with notifications. This is the guideline we've followed

* P1 Page/notification sent to responsible team 24x7/365

* P2 Page/notification sent to responsible team during a subset of hours as determined by team. (6AM-10PM, 7AM-5PM, etc.)

* P3 email only notification (work email, 24 x 7)

* P4 no notification, alert stays active in console until someone manually closes it

* P5 alert closed in 1 minute unless it continues

For all but the P3 = email only, we can make happen through the use of routing rules, escalation policies, and notification policies.

The biggest issue with this is that in order for us to get the P3 alert to work correctly, each user needs to have a specific notification rule for P3 alerts that routes them to their company email with no other notification methods enabled (for P3s). This has worked ok for a smaller subset of users but as we deploy to a much larger user base, I would like to see if there is a way to accomplish the same thing on a larger scale.

I know we could implement central notification templates but as I understand it, that removes the ability for the user to configure their own notification preferences. Is their any way to always route notifications for certain alerts (either priority or some other designation) to email only but still allow users the ability to customize their notification preferences?


Answers:
author: connor mcguane
body: We recently switched over to Opsgenie from an in-house tool, and we had very similar priority rules. For the migration, we wrote some custom scripts to give all users a "default" set of notification rules. In this case, ours is email only for P5, P4, and then anything higher pages. You will need some calls to the Notification API and the Notification Rule Step API. We applied this to \~500 users.


Tags: cloud
Opsgenie alerts auto closing problems
Asked by Rolandas Jan?auskas:

Dears,

Functionality of the integration Jira Service Management to Opsgenie isn't working correctly. When an issue is closed and resolved in Jira Service Management, the alert in Opsgenie does not close. How to setup this feature to close Opsgenie alerts?


Answers:
author: Nick H
body: Hi [@Rolandas Jan?auskas](/t5/user/viewprofilepage/user-id/4220139) ,

If closing an issue in JSM does not close the correlated Opsgenie alert, then there are a few places to check.

In JSM / the webhook, make sure that Issue Update checkbox is selected:

![JSM comm 1.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/128471iFF8203D745392F2C/image-size/large?v=v2&px=999 "JSM comm 1.jpg")

If this is selected, then the close actions are most likely sending to Opsgenie, but they are not matching what is configured in the Close Alert action of the integration.

This can be reviewed in the Advanced tab of the JSM integration:

![JSM comm 2.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/128472iB4A8C9BA9494EF30/image-size/large?v=v2&px=999 "JSM comm 2.jpg")

Here is where you can configure what JSM requests will close an alert. By default, the only condition Opsgenie looks for is for is: Status Category = Done.

You may need to edit this condition, or add additional ones that filter on what states the issue transitions into:

![JSM comm 3.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/128476i4304C20697FA7C39/image-size/large?v=v2&px=999 "JSM comm 3.jpg")

You can always troubleshoot what data is being parsed in these requests as well under the Settings Tab \>\> Logs Tab. If the request is being receive, an error log typically appears explaining there isn't a matching condition. You can review the log to determine which fields the integration's filter / conditions need to meet for the alert to close when the issue is transitioned:

![JSM comm 4.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/128477i0039A411F84791C3/image-size/large?v=v2&px=999 "JSM comm 4.jpg")

Hope this helps! Let us know if you have additional questions or issues.

comments: author: Rolandas Jan?auskas
body: Dear Nick,

thanks for quick reply, but I'm unable to find Advanced tab of the JSM integration.

Maybe not all Opsgenie versions allow Advanced configuration?


author: Nick H
body: That's correct. The Advanced tab is only included in the Opsgenie Standard or Enterprise plans. Our plans map to JSM as such:

JSM Standard \~ Opsgenie Essentials (which is the plan I assume you are subscribed to if you do not see this tab)

JSM Premium \~ Opsgenie Enterprise


author: Rolandas Jan?auskas
body: Dear [@Nick H](/t5/user/viewprofilepage/user-id/2540930)

thanks, noted.


Tags: jira-service-management
One user in multiple teams
Asked by Pablo Kopelman:

I'm working with two separate teams with separate opsgenie schedules and I would like to be in each schedule but not being on call the double of time that the others that are in a single team, anyone knows some way to configure something like that? I don't know, some way to skip on call time from one schedule or something like that? Thanks for any help!


Answers:
author: Nick H
body: Hi [@Pablo Kopelman](/t5/user/viewprofilepage/user-id/3560153) ,

This isn't really possible because both schedules will be managed separately since they are on different teams.

Opsgenie also cannot recognize you being on-call at the same time in two schedules, and automate changing on-call for one of them. That change would need to be done manually.

It's dependent on the user to determine when there is going to to be overlap. You can always review which schedule(s) you are on-call under the Settings tab \>\> Your on-call schedule tab.

![on-call comm 1.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/128736i69EFE724A2F4567F/image-size/large?v=v2&px=999 "on-call comm 1.jpg")

Then if you identify there is going to be overlap, add an override in one of the schedules or essentially "switch" shifts with another user using a few overrides: <https://docs.opsgenie.com/docs/schedule-overrides>

![on-call comm 2.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/128737iBE688FBEF7156534/image-size/large?v=v2&px=999 "on-call comm 2.jpg")

comments: author: Pablo Kopelman
body: Thanks Nick, do you know if there is any other approach that might be useful? maybe some way to merge schedules and route alerts to each team or something similar?

Also, if I add an override, I'm switching shifts or adding hours to another teammate?

Thanks!


author: Nick H
body: I don't believe there is much else that would help besides what's mentioned above.

You could have one schedule that manages the on-call for both teams - but that doesn't make much sense because 1) it sounds like members of each team are different, and 2) the schedule can only be visible/assigned to one team - so would only appear within one team's On-Call dash.

And yes - overrides can switch on-call shift with yourself, other users/teammates, or No-One if needed.


Tags: cloud
Is there a way to pass jira IDs to bamboo build api
Asked by Chethan K P:

Hi,

We are using Bamboo REST API to run the builds automatically. And we want to pass the jira's associate with the build too. Is there any way we can do that.

We are using below method to run the build

curl -k --user user:password -X POST -d "stage\&executeAllStages" http://bamboo:8085/rest/api/latest/queue/proj_Name-plan_Name

If I have Jira number ji-23,ji-24,ji-25 \& ji-26 I want to pass this jiras and want to see in the build in commit section.

Thanks,  
Chethan


Answers:
author: Richard White _TechTime_
body: Hi Chethan,

As far as I know there is no direct way through the rest api.

I do know of a workaround though. Adding a comment with the issue key, links it correctly to the jira issue.

The first request to start the plan returns xml including the build key and number.

If you parse that build number and then make a comment for each jira issue that you have e.g:  

```
curl -k --user user:password -X POST -d "{\"content\":\"ji-23\"}" http://bamboo:8085rest/api/latest/result/projectkey-plankey-buildnumber/comment -H "Content-Type: application/json"
```

Then a comment will appear on the build, correctly linking it to each of the issuekeys and adding it to the "issues" section of the build.

Hope that helps!

Richard

comments: author: Chethan K P
body: Thanks for quick response,

Once I run this curl command as provided I get a \> prompt in linux box so i feel still expecting some other data.

Can you Please help me on this.

Regards,

Chethan


author: Richard White _TechTime_
body: That can happen if you haven't matched all of your quotes:

e.g you have a starting " but not an ending one.

There is also slightly typo in my comment, url should be http://bamboo:8085/rest..., not http://bamboo:8085rest.

If it's still not clear after a close look at your command, maybe paste it here (minus the username and password)


author: Chethan K P
body: Hi Richard,

Thanks a lot. I am able to post the comment thanks for all the help

Regards,

Chethan


author: Richard White _TechTime_
body: Glad I could help.

If it solved the underlying problem, feel free to mark the answer as solution, it helps other people having the same issue find the answer.

Cheers,

Richard


Tags: api
How can I get a failed job in a stage to stop all the rest of the subsequent FINAL stages?
Asked by Kurt Ehrler:

We use Bamboo to build new VM environments to do a bunch of testing on our code. Sometimes the environment build fails, and ideally things would stop at that time, but instead Stage 1 Job 1 fails and and while Stage 2 and 3 fails, Stages 4, 5, 6 and 7 are of type FINAL and they don't fail and all their tasks try to run, even though they have no environment to run on.   
How can I get the initial failure to fail the rest of the Bamboo plan run even if other stages are of type FINAL?  


Answers:
author: Kurt Ehrler
body: I resolved this by doing the following.

1) After the environment build (SSH), I've added the following two tasks.

2) Add Script immediately after environment build to write a parameter key set to a file on the Bamboo server.

3) Add Inject Variable as a task after the Script from part 2.

4) For any FINAL Stages, add a Script at the beginning of the list of tasks that will check the variable set at Step 3 and based on the results, if the parameter is not set when the environment build, the Script will fail, so that the Stage of type FINAL will also fail.   

comments: author: Hector Magnanao
body: How do i add step #2 and #3 in your solution above ?
How to recover deleted plan given file level backup
Asked by Mark Segal:

[https://community.atlassian.com/t5/Bamboo-questions/How-to-recover-deleted-build-in-Bamboo/qaq-p/604103](https://community.atlassian.com/t5/Bamboo-questions/How-to-recover-deleted-build-in-Bamboo/qaq-p/604103?tempId=eyJvaWRjX2NvbnNlbnRfbGFuZ3VhZ2VfdmVyc2lvbiI6IjIuMCIsIm9pZGNfY29uc2VudF9ncmFudGVkX2F0IjoxNTk2NTUxNzE3MTEyfQ%3D%3D#U1448620)

In the above question, an answer states:

\> It's not possible to restore plan within Bamboo, but you have disk/DB backup it's possible

How can I restore a plan given that I have a full disk backup?


Answers:
author: Jeyanthan I
body: Hi Mark,

If you have a backup of both database and bamboo-home, you may install the same version (from [bamboo archive](https://www.atlassian.com/software/bamboo/download-archives)) and recover the skeleton of the plan by [exporting as Java Specs](https://confluence.atlassian.com/bamboo/exporting-existing-plan-configurations-to-bamboo-specs-894743917.html) and use it to import onto your current setup. Unfortunately, you cannot preserve the build history.

This is what is suggested in this feature request as well: [BAM-1223](https://jira.atlassian.com/browse/BAM-1223)  

Hope that helps.

Cheers,  
Jey
Gatekeeper merge multiple repos back to master
Asked by Diane Haldeman:

I have a project in Bamboo with multiple repos. I'm trying to setup a plan branch (with X repos) such that each repo points to a "release" branch, and have Gatekeeper enabled to push back to master.

However only the "main" repo's changes are being pushed to master.

The documentation states:

*Gatekeeper* --- the default repo is only updated with changes in the branch that have built successfully.

Is there a way to trigger pushes back to master for all repos (not just the default/main repo)?

Thank you


Answers:
author: Diane Haldeman
body: I ended up accomplishing this manually...

I created a "Script" task to checkout each repo's master and merge my release branch into it:

```
cd <repo1>
git checkout -f master
git remote set-url origin ssh://git@git.arl.psu.edu:7999/<project>/<repo1>.git
git merge -m 'Merging release into master' origin/<release_branch>

cd <repo2>
git checkout -f master
git remote set-url origin ssh://git@git.arl.psu.edu:7999/<project>/<repo2>.git
git merge -m 'Merging release into master' origin/<release_branch>

...
```

And I created a "Repository Push" task for each repo to push its changes back to master.
Work with Java 8 and Java 11 in the same machine
Asked by gbdavid2:

I understand that Bamboo is still not compatible with Java 11.

I have some software in my server that requires Java 11 to work, but I also have Bamboo in the same server. I know you can install both. Java 8 and Java 11 and keep them at the same time...

For the JAVA_HOME variable (Windows Server 2012), I see I can add multiple entries, but that won't necessarily mean that Bamboo will find the compatible one in the list?

It there a setup or arrangement I can do in my server so that Bamboo detects there's a Java 8 and uses it, and the other Software uses Java 11? (I can't edit anything in the other software, so the default pointers/variables must direct to Java 11 so that the other software detects it).


Answers:
author: Erick Johanson
body: i think you need to edit some config file, there are options to set envionment (i know from jira) you can set in config file where java_home which one to use, i think this way can be correct or looking for solution to set env for (bamboo user)

bamboo directory and files

<https://confluence.atlassian.com/bamboo/locating-important-directories-and-files-289277247.html>

plan B

found something maybe will helps

<https://stackoverflow.com/questions/26993101/switching-between-different-jdk-versions-in-windows>

There are some code block that said how to

The `set` command only works for the current terminal. To permanently set a system or user environment variable you can use [`setx`](http://technet.microsoft.com/en-us/library/cc755104.aspx).

    setx JAVA_HOME "C:\Program Files\Java\jdk1.7.0_72" /m

setx doc:

<https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/setx>

p.s. test it on stage before prod, and make backup copy of config files


Tags: java
Run npm inside isolated docker container
Asked by Pascal Gro?:

Hi there,

I'm unable to get this working:

I've setup a job with Isolate build via Docker Container with Docker image: node:lts

I now assume, that the job creates a new container from the image node:lts and runs the tasks inside this container. Right?

One task would be to run 'npm install'. But the npm configuration wants a node.js executable, which resides inside the docker container which is not available at the time of configuration.

Am I using it wrong?


Answers:
author: Chris
body: Had the same issue. From my understanding the problem is that the npm task will look at the agent's capabilities and fail because no node.js executable is defined.

You have to manually define a node.js executable (even if node is not installed on the agent).

Either via the web ui (Admin -\> Agents -\> (Click on your agent) -\> Capabilities tab -\> Agent-specific capabilities) or properties files: [Configuring remote agent capabilities using bamboo-capabilities.properties](https://confluence.atlassian.com/bamboo/configuring-remote-agent-capabilities-using-bamboo-capabilities-properties-289276849.html)

Then the capability check will complete and the build will happen inside the container.

or just run \`npm install\` in a shell script task ????


Tags: docker
How to create a msbuild task using BambooCLI
Asked by Girish:

Hi,

I am trying to create a MSBUILD task using BambooCLI commands. The commands I have tried are given below:

1) \>acli mybamboo --action addTask --plan STITESTCLI-PLAN40 --job SETUP --taskKey "MSBUILD" --description "building"  
--build "MSBuild v14.0 (32bit)" --projectsFile "Stars.msbuild"

++Output:++   
Parameter error: Unknown flag 'projectsFile'. Action was addTask for the bamboo client. Other related clients were also attempted without success.

2) \>acli mybamboo --action addTask --plan STITESTCLI-PLAN40 --job SETUP --taskKey "MSBUILD" --description "building" --build "MSBuild v14.0 (32bit)" --solution "Asml.Stars.msbuild"

++Output:++   
Parameter error: Unknown flag 'solution'. Action was addTask for the bamboo client. Other related clients were also attempted without success.

3) \>acli realbamboo --action addTask --plan STITESTCLI-PLAN40 --job SETUP --taskKey "MSBUILD" --description "building" --build "MSBuild v14.0 (32bit)" --file "Asml.Stars.msbuild"

++Output:++   
Client error: Request failed on the server with response code 500. Make sure all required fields have been provided using the various field and value parameters. The server log may provide insight into missing fields.

I have checked in all the BambooCLI and AtlassianCLI documentation but could not find any example or reference of MSBUILD taskkey.

I would like to know how to use the taskkey MSBUILD its usage and arguments to be sent through the BambooCLI client.

Bamboo Server Version: 5.15.3

Bamboo CLI Server Version: 9.2.0

Atlassian CLI Client Version: 9.1.0

Kindly provide your help.

Thanks,

Girish


Answers:
author: Manisha Kharga _Appfire_
body: Hi [@Girish](/t5/user/viewprofilepage/user-id/3754086)

We are from **Bobswift Support team**and have created a support request in our portal to discuss more on your requirement.

We request you to please access the support request <https://bobswift.atlassian.net/servicedesk/customer/portal/1/SUPPORT-4439> to discuss more on this issue.

Thanks,  
Manisha


Tags: cli

ms-build
Insufficient capabilities
Asked by Yashwanth Balaraman:

I installed a remote agent and tried to run a plan with the remote agent. I requested the support team to add the agent to my system but still it says insufficient capabilities. Should I update something in my system to make it work ?![Remote-Agent-Support.jpg](/t5/image/serverpage/image-id/104778i5BB4D54618422730/image-size/large?v=v2&px=999 "Remote-Agent-Support.jpg")


Answers:
author: Alexey Chystoprudov
body: It means that agent is dedicated to some build plan and doesn't meet all requirements of it

comments: author: Yashwanth Balaraman
body: I don't see any requirements in my plan. Does it have any default requirements that needs to be updated when a plan is created.


author: Alexey Chystoprudov
body: If you have checkout task it might add requirement for VCS command line tool, for example Mercurial.

If Requirements tab of every job/plan dedicated to this agent is empty - raise support case at <https://support.atlassian.com> to get help from our engineers.


author: Yashwanth Balaraman
body: Bamboo server team made some changes in including the remote agent to my project and it works fine.

Thanks for your solutions.
MySQL with TLS
Asked by Brandon Etheredge:

Has anyone had luck setting up MySQL using an external server and using a SSL connection?

We are using an RDS instance running MySQL 5.7.30 but when setting up Bamboo on the database step get the error:

Tue Jul 28 12:36:25 UTC 2020 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

When we useSSL=false, we get an error in the interface but no error messages in the catalina log


Answers:
author: Varma Gadiraju
body: Hey Brandon,

You need to add "**useSSL=false\&amp;**" this parameters in the dbconfig file.

**Example:** \<url\>jdbc:mysql://localhost:3003/jiradatabase?useUnicode=true\&amp;**"---ADD HERE---"**characterEncoding=UTF8\&amp;sessionVariables=default_storage_engine=InnoDB\</url\>
What's the correct way to use Groups for Crowd using SSO?
Asked by Brian Louks:

I've been playing a bit with Crowd integration with JIRA and Confluence and using SSO. I have a single user base (just employees of my company). I want to use Single sign on between JIRA and Confluence.

I have JIRA 4.2.3, Confluence 3.4.9 and Crowd 2.3.3

Two questions:

1. How many user directories should I have in Crowd? One directory for all employees, or one for each of JIRA and Confluence (where each employee has an account in both)?   
   I assume it's one directory (Single Sign On doesn't appear to work when I add my users to both a JIRA and Confluence directory)
2. Assuming I should go with one directory, how should I do groups? I have Confluence groups that I don't want to show up in JIRA, and I have JIRA groups that I don't want to show up in Confluence. But when I have a single directory, and I add a Confluence group to a user, that group also appears in JIRA for that user. And vice versa.

Any tips on how this should be set up?


Answers:
author: Colin Goudie
body: Use one directory and use groups in the applications to control athentication into the applications. Yes you will see all the groups from the directories in each application but those groups don't need to have 'use' permissions to those applications.

Oh and I guess, the group assignments etc.. really have nothing to do with SSO. You can't have some users supporting SSO and others not (that I'm aware of anyway)

comments: author: Brian Louks
body: Thanks for the confirmation. SSO only plays in because then I can't use different directories for different applications. If I wasn't using SSO, I could create a directory for each app, with identical user names in each, and keep the groups separate.


Tags: sso