youngmon/atlassian-qna huggingface dataset:
How to Run Bamboo Remote Agent Service in Background
Asked by Mohammad Saleem:

I have installed Bamboo Agent Service through InstallBambooAgent-NT.bat file. The service is running but when we are running the plan through master Bamboo server not able to run plan successfully. I have also updated the logon properties in Bamboo Agent Service.

Below error is coming:

C:\\Users\\MissionUser\\bamboo-agent-home\\xml-data\\build-dir\\SDCPROD-SDC4REL5-JOB1\>tasklist /fi "imagename eq Wise32.exe" \| find ":" 1\>nul  
'tasklist' is not recognized as an internal or external command,  
operable program or batch file.

Please provide the solution that how we can run bamboo agent service in background.

Thanks,

Saleem


Answers:
author: Daniel Santos
body: Hi [@Mohammad Saleem](/t5/user/viewprofilepage/user-id/3642040)

The command above is not running possibly because the PATH variable is not defined while the command is called. It usually happens when the agent is not running with a Linux local user, but instead with a system user.

We do recommend that a local user is used and if this is your case, you can adjust this by following this article:

* [Running Bamboo as a Windows service as the local user - Atlassian Documentation](https://confluence.atlassian.com/bamboo/running-bamboo-as-a-windows-service-as-the-local-user-416580754.html)

Please let us know if that fixes the issue.
Restrict access to creating PROD deployment jobs
Asked by Lars:

We have two *types* of environments : PROD and NONPROD. We have many, many applications. (\> 50)

The concept of environment type goes across applications in our organisation, i.e. each application (which equates to a Deployment Plan in Bamboo) will have at least two environments, e.g. for AppA there will be environments "AppA-PROD" and "AppA-NONPROD".

There are many people to whom we would like to grant access in Bamboo to create deployment jobs that end in a NONPROD-type environment. There are only a few who should be able to do the same for PROD-type environments.

How can this be accomplished?

I know that we can set permissions on an environment for a given plan once it has been setup, but that doesn't accomplish our goal of allowing people to set up their own deployments into NONPROD.

A few ideas

* We can possibly have Bamboo Agents that are permissioned to deploy into PROD and others that are not. Then we can have "Deploy-To-Prod" as a capability. However this only moves the problem: Is there a way to restrict access to capabilities in Bamboo? (i.e. only certain users are allowed to create jobs which use a certain capability)
* We can - and will indeed - have two sets of Bamboo *shared credentials*, one for PROD and another for PREPROD. But this then begs the question how we restrict access to using those credentials in jobs ?
* ?

Please advice.


Answers:
author: Lars
body: I'll answer my own question.

It seems **Agent Dedication** is the way to go.

comments: author: Lars
body: Ooops. That won't work.

An agent can be dedicated on two ways:

1. By the Bamboo global admin: From the Global Settings - by dedicating the agent (or the image if using the Elastic Bamboo feature) to one more more existing deployments environments.
2. By the person who creates/edit a deployment environment: This can have a dedicated agent. This will have the same effect as (1).

So if we have an agent with super-privileges then in fact any user (with permission to create/edit any type of deployment job) can do (2) and thereby **circumvent** (1). Therefore, Agent Dedication is ++not++ a way to restrict user's access to that agent.


Tags: deployment
Bamboo: can the automatic branch cleanup schedule be configured?
Asked by Dave Belliveau:

Automatic branch cleanup has not been working on our Bamboo instance. It occurred to me that because our instance runs on EC2, and we shut it down at night to reduced costs, maybe the cleanup job was simply not running. I let the instance run overnight and sure enough, at 3am, dozens of branches were cleaned up. I would like to schedule the branch cleanup to occur during the day, but I can't find anywhere to configure the schedule. I have changed the Expiry schedule to occur during the day but that does not seem to affect the branch cleanup schedule. Is it possible to configure the branch cleanup schedule?

We're running Bamboo 6.10.3

Thanks


Answers:
author: Alexey Chystoprudov
body: Try to use this system property <https://docs.atlassian.com/atlassian-bamboo/6.10.3/com/atlassian/bamboo/utils/SystemProperty.html#BRANCH_EXPIRY_SCHEDULED_TIME>

comments: author: Dave Belliveau
body: Hi,

I added this property to JVM_SUPPORT_RECOMMENDED_ARGS in bin/setenv.sh and it worked perfectly. Thank you very much.

: ${JVM_SUPPORT_RECOMMENDED_ARGS:="-Duser.timezone=America/New_York -Dbamboo.branch.expiry.schedule="20:00""}
How to Change Jira IP address and port when migrating servers
Asked by Arun Pillai:

How to change IP Address and Port when migrating servers. I have Jira hosted on Windows 2016 server with X:8000 however had to move the server to different subnet.

Now unable to access Jira with same IP and Port, how to update the IP address.

I created a snapshot and launched the same machine in another subnet


Answers:
author: DPKJ
body: [@Arun Pillai](/t5/user/viewprofilepage/user-id/3569673)Welcome to the community.

You just need to do couple of things,

* Get the IP of the machine and access Jira using it
  * Use \`ifconfig\` command on your Windows Command Prompt
  * Check this link for help - <https://tecadmin.net/check-ip-address-windows-command-line/>
  * Access Jira,
* Reset JIRA Base URL to new IP
  * Check this knowledge base article - <https://confluence.atlassian.com/adminjiraserver/configuring-the-base-url-938847830.html>

comments: author: Arun Pillai
body: Thanks for the detailed steps for migration.

I have update the IP address however the license seems to be linked to profile on the older AWS instance. Are there any steps to bind it to the new profile?


Tags: jira
How do I access bamboo environment secret variable inside python script?
Asked by Subhi Andrews:

I have defined a global bamboo secret variable and I am using it inside my python script like this:  

my_var = os.environ\['bamboo.my_environment_secret'\]

It's returning None.

I have defined a global variable named my_environment_secret in Bamboo. The way this script is executed, I can't pass any parameters from command line. So it has to be accessed directly inside the script.


Answers:
author: Subhi Andrews
body: Since python doesn't accept '.' as valid character in variable names, i tried replacing '.' with '_' ( underscore) and that seemed to have done the trick.


author: Jimmy Seddon
body: Hi [@Subhi Andrews](/t5/user/viewprofilepage/user-id/191872),

I have never tried calling a variable directly from a script (I'm usually passing it as a parameter). However, the syntax I always use when passing it as a parameter is: '${bamboo.my_environment_secret}'

Which you can see is how Atlassian recommends you use it in the documentation here: <https://confluence.atlassian.com/bamboo/bamboo-variables-289277087.html>

I hope that helps!

-Jimmy
where bamboo build variables get retrieved from
Asked by manohar sivakumar:

Bamboo build logs spits out a long list of variables... not necessarily i could find all of them from the global variables or in project specific variables. Can someone please help me demystify where these variables are getting from??


Answers:
author: Jimmy Seddon
body: Hi [@manohar sivakumar](/t5/user/viewprofilepage/user-id/3637518),

Welcome to the Community!

A number of those variable are Bamboo system variables which you can find documented here: <https://confluence.atlassian.com/bamboo/bamboo-variables-289277087.html>

I hope that helps!

-Jimmy

comments: author: manohar sivakumar
body: Thanks Jimmy... Bamboo variables are exported as bash shell variables. All full stops (periods) are converted to underscores. For example, the variable `bamboo.my.variable` is `$bamboo_my_variable` in bash. This is what i was looking for.


author: Jimmy Seddon
body: I'm glad that was able to help you solve your issue!
Can we run another build at a time if Elastic agents are using less CPU usage for the first build
Asked by chandra:

Right Now for certain builds the Elastic Agents are using less than 50% of CPU usage can i run another build with the same elastic agent at the same time which uses less than 50% of CPU usage.


Answers:
author: Gonchik Tsymzhitov
body: Good question, but that one mostly relate your build procedure unfortunately.

because it's really depends on the your stack, technology and pipelines
How to disable job programically
Asked by Mj:

Is it possible to disable bamboo job conditionally using PreJobAction or PreChainAction ?

I could not find any related methods in StageExecution,BuildContext,ChainExecution,Chain classes


Answers:
author: Daniel Santos
body: Hi [@Mj](/t5/user/viewprofilepage/user-id/1815789)

You are most likely to get a good response to this question if you submit it in <https://community.developer.atlassian.com>. That is the right channel for discussions around Atlassian API and development.  

Please create another question there and add the relevant tags =\]  
I hope you get an answer to your inquiry soon.


Tags: app
How to list projects using given plugin?
Asked by JacekP:

Currently we have dozens od plugins, some paid, some free, and multiple projects.

The problem:

we don't know, if a given plugin is used anymore, and if yes, by which project.

The plugin which is the most important for me, is used as a task in builds plan, so there should be a way to find all projects, and build plans, using that specific task?

Could not find a way to do this, any ideas?

BR

Jacek


Answers:
author: Daniel Santos
body: Hi [@JacekP](/t5/user/viewprofilepage/user-id/2368288)

We don't have a feature for that in Bamboo, but you can use the following DB query to search for plan jobs configured to use the given plugin as a task.

```
SELECT full_key, xml_definition_data
FROM build b
JOIN build_definition bd ON b.build_id=bd.build_id
WHERE xml_definition_data LIKE '%<PLUGIN_KEY>%'
```

(i) If you need to discover the \<PLUGIN_KEY\>, please go to **Admin \> Overview \> Manage apps \> (your plugin) \> app key** .  

?? We can't assure that this will cover all the plugins you want, given that a plugin will not always create a complete task on its own. Some of them will only add extra features to existing tasks (for these cases the query may not work).

I hope it helps anyway.
How to start/stop Website and application pool on another server while deploying my project?
Asked by l.aizdi:

Currently I am using this Powershell script which runs before deployment.   

$Password=Convertto-SecureString -String ${bamboo.deploy.password} -AsPlainText -force  
$Credentials=New-object System.Management.Automation.PSCredential ${bamboo.deploy.username},$Password  
Enter-PSSession -ComputerName ${Server} -Credential $Credentials  
Invoke-Command -ScriptBlock {start cmd;cd C:\\Windows\\System32\\inetsrv;appcmd stop apppool /apppool.name:"${app_pool_name}"}

But it gives the following error:

The term 'appcmd' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

I have also tried using the Stop-WebAppPool cmdlet. It also gave an error saying Stop-WebAppPool is not recognized as the name of any cmdlet. I have also tried Import-Module WebAdministration before Stop-WebAppPool cmdlet. It also was not successful.


Answers:
author: Jimmy Seddon
body: Hi [@l.aizdi](/t5/user/viewprofilepage/user-id/3599878),

Sorry no one has been able to help you with this issue yet.

Looking at it, my first thought would be to check what Powershell modules are installed/imported on your web server.

Stop-WebAppPool is not a part of the standard Powershell library. It's part of the WebAdministration Module which would need to be imported ahead of running the command.

What you can do, is add an if block to check if the WebAdministration module exists, and if not run:

    Import-Module WebAdministration

I understand you may have solved this already but if not, I hope that might help you out.

-Jimmy
MatlabEngineTest Failing in Bamboo
Asked by MuruganSankar:

Hi Team,

We are trying to build maven project via bamboo cicd. In that we are using matlab to execute our test cases. While building test cases are failed with below matlab error.

**MatlabEngineTest.initMatlab:22 \>\> UnsatisfiedLink Failed to find the library mc...**

Please share your valuable input to fix this error.

Note - I have installed matlab in my system and that installed location in path variable as well.


Answers:
author: Daniel Santos
body: Hi [@MuruganSankar](/t5/user/viewprofilepage/user-id/3511312)

It would be great if you could share the build log errors right before this one. They would probably help us to see what could be causing this one. I'm assuming this is working on terminal, but not in Bamboo. Is that correct?

Please keep in mind that after changing/adding environment variables you need to make sure the remote agent is also restarted. If you are using a local agent you will need to restart the Bamboo server. This happens because environment variables are inherited from the parent process when Bamboo or the remote agent is started and new changes are not noticed. This is not an issue, but the way the OS works.  

**Suggestions for moving forward :**

* Restart the server or remote agent if necessary.
* Check if this maven build is working from the terminal (considering the agent machine used for this build).
* Share more log lines around this error to allow us sharing more ideas for troubleshooting this.
Issue with Bamboo Build Agent
Asked by Harsh Wardhan Gaur:

I have 2 EC2 instances on AWS with windows installed on to that. One server is where I have installed the Bamboo Server and other server I want to install the build agent and to keep them both different.

I followed the documentation but not able to do that, I got the jar file, created the directory in C drive with name agent and moved the jar file into that. Afterwards, I accessed the command prompt as Admin and navigated to the agent directory and ran the given command with the public ip of my instance.

The command starts the unzipping the files but not able to authenticate the agent. Nothing comes in the remote agent section. Also I have changed the port to 80 still jot able to access the bamboo via the public ip over the browser from other systems. IIS is not installed so that is not an issue.


Answers:
author: Edwin Kyalangalilwa
body: Hi [@Harsh Wardhan Gaur](/t5/user/viewprofilepage/user-id/3634260) ,

This is what's currently working for us. Also, ensure that port 54663 is open on the security group.

![Screen Shot 2019-11-13 at 5.07.16 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/72809i4BB8CB731773214E/image-dimensions/526x280?v=v2 "Screen Shot 2019-11-13 at 5.07.16 PM.png")


Tags: aws
How to configure bamboo into docker
Asked by Anil Shah:

while running below command

    docker run -v bambooAgentVolume:/home/bamboo/bamboo-agent-home --name="bambooAgent" --init -d atlassian/bamboo-agent-base BAMBOO_SERVER_URL

Even after providing BAMBOO_SERVER_URL i'm getting error

INFO \| jvm 23 \| 2019/11/12 07:34:34 \| 2019-11-12 07:34:34,266 INFO \[WrapperSimpleAppMain\] \[AgentContext\] Authenticating against Bamboo server at <http://bamboo.xxxxxx.com//agentServer/>

INFO \| jvm 23 \| 2019/11/12 07:34:34 \| Exiting due to fatal exception.

INFO \| jvm 23 \| 2019/11/12 07:34:34 \| java.net.UnknownHostException: bamboo.xxxxxx.com: Name or service not known

ERROR \| wrapper \| 2019/11/12 07:34:34 \| JVM exited while starting the application.  
STATUS \| wrapper \| 2019/11/12 07:34:39 \| JVM process is gone.


Answers:
author: Edwin Kyalangalilwa
body: Hi [@Anil Shah](/t5/user/viewprofilepage/user-id/3631819) ,

The error is due to the container not being able to recognize and reach bamboo.xxxxxxx.com

```
java.net.UnknownHostException: bamboo.xxxxxx.com: Name or service not known
```

Add something like

```
12.345.678.90    bamboo.xxxxxxx.com
```

To **/etc/hosts** file of the Docker container

comments: author: Anil Shah
body: Thanks [@Edwin Kyalangalilwa](/t5/user/viewprofilepage/user-id/255918) . This helps :)
Add watcher to the linked issue
Asked by Arkadiusz Alicki:

Hi,

We've got the following automation rule which clones issue to another project if it is certain request type:

![ss1Jira.png](/t5/image/serverpage/image-id/329135iAE67940779723DD3/image-size/large?v=v2&px=999 "ss1Jira.png")

Unfortunately, when someone comments or update linked issue, original reporter does not get an notification. That's why we want to add reporter as a watcher to the linked issue. How to achieve that? Thanks !


Answers:
author: Duc Thang TRAN
body: Hello [@Arkadiusz Alicki](/t5/user/viewprofilepage/user-id/5517930)

The quickest way that came to mind is to add a branch for each if as illustrated in the attached image.

Hope this can help you :)

![2024-06-11 14_22_37-Audit log - Automation - Web Interface - Jira.png](https://community.atlassian.com/t5/image/serverpage/image-id/329146i74B7677CBADA0207/image-size/large?v=v2&px=999 "2024-06-11 14_22_37-Audit log - Automation - Web Interface - Jira.png")

comments: author: Arkadiusz Alicki
body: It worked! Thanks!


author: Vijay Dadi
body: Hello [@Arkadiusz Alicki](/t5/user/viewprofilepage/user-id/5517930) ,

you can add the water in your automation itself, after the issue is created (ref below).

Hope this helps !

![Screenshot+2023-06-08+at+3.08.35+PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/329145iD27B26DB5BC9D2D1/image-size/large?v=v2&px=999 "Screenshot+2023-06-08+at+3.08.35+PM.png")


Tags: cloud

jira-service-management

jira-service-management-cloud
create document auto and change to next states by by a fixed date of of month
Asked by Owen:

We need below function (comala workflow function):

1. Create one document automatically by template;

2. Auto move to next state by a fixed date of a month (example 15th each month).

Thanks!


Answers:
author: Nino Stana
body: Hello [@Owen](/t5/user/viewprofilepage/user-id/5294679) ,

What is your Confluence hosting where you use the workflows, Cloud, or Data Center? The answer depends on that

comments: author: Owen
body: [@Nino Stana](/t5/user/viewprofilepage/user-id/4086364) Date Center version.


author: Nino Stana
body: I have replied to the new request that you have opened:

<br />

<https://community.atlassian.com/t5/Confluence-questions/how-to-create-document-automatically-and-change-to-next-states/qaq-p/2723442>

I hope this helps


Tags: confluence

confluence-server

jira-service-desk-data-center

jira-service-management-data-center
difference between external and internal customers
Asked by Rim Ben Rejab:

hello guys,

someone asked me what can internal customers do that external customers don't.

does anyone have an answer? :/

thank you so much


Answers:
author: Christian
body: Hello

The primary difference is visibility to customers. In the customer portal, Internal comments are not visible, while external comments are.

In terms of functionality, they are the same. The comments have the same features weather internal or external. One benefit to internal comments is that if your instance of Jira has other licensed users, say for Jira software, that do not have a JSM license, they are able to make and read internal comments assuming your privilege scheme is setup correctly.

I hope this helps!

Christian

comments: author: Rim Ben Rejab
body: thank you christian \^\^ I appreciate your help!


Tags: cloud

jira-service-management

jira-service-management-cloud
Can you clone a ticket to multiple projects at once
Asked by Will Dewfield:

Quick question to anyone who can help - can you clone a ticket within a SM project to multiple other service management projects at the same time ( click to clone - select multiple project)


Answers:
author: Valerie Knapp
body: Hi [@Will Dewfield](/t5/user/viewprofilepage/user-id/5484985) , thanks for your question.

You should be able to do this with Automation, if you're open to using that. Check out this rule from the Automation library - <https://www.atlassian.com/software/jira/automation-template-library#/rule/9918982> . You can just add more clone actions for each project you want to clone the issue into.

Hope this helps.

Cheers


author: Mohammed Aamer Khan
body: Hi [@Will Dewfield](/t5/user/viewprofilepage/user-id/5484985)  

You cannot clone a ticket from one project to another. However you can CLONE a ticket and MOVE it to required project.

comments: author: John Funk
body: Hey [@Mohammed Aamer Khan](/t5/user/viewprofilepage/user-id/5297319) - using Automation you can identify the project you are cloning the issue into. This is not assuming you are doing a manual clone on the issue.


author: Mohammed Aamer Khan
body: Thanks [@John Funk](/t5/user/viewprofilepage/user-id/7148)  
Yeah using automation we can achieve it. But as [@Will Dewfield](/t5/user/viewprofilepage/user-id/5484985) mentioned using "Click to Clone" option, I have answered according to that.  


author: John Funk
body: Very good - I missed that.


author: John Funk
body: Hi Will,

You can clone to multiple projects, but it would be a separate Clone action for each project as you have to identify the Project the issue is going into.

comments: author: John Funk
body: You can create a manual automation rule to clone into another project if you wanting to click. :-)


Tags: cloud

jira-service-management

jira-service-management-cloud
Learning Scirptrunner for Jira
Asked by Habib Hawsawi:

Hi, I just start working as an admin Jira service management (Data Center Server). I would like to ask if there ways to learn the scriptrunner and do more practice, like some documentations or books.


Answers:
author: Rilwan Ahmed
body: Hi [@Habib Hawsawi](/t5/user/viewprofilepage/user-id/5517649) ,

Welcome to the community !!

You have the guide here: <https://docs.adaptavist.com/sr4js/latest>


Tags: jira-service-desk-data-center

jira-service-management

jira-service-management-data-center
Jira Automation for JSM Portal
Asked by Julliane Chan:

Is it possible to use jira automation for JSM portal?

What I want to do is to keep the form blank on landing page and when the category has been selected the required fields will be shown and if the category is changed the fields will also change


Answers:
author: John Funk
body: Hi Julliane - Welcome to the Atlassian Community!

You don't need to use cascading fields in the advanced forms, you handle that with sections. So you can have a dropdown with various values, and based on the value selected, you can show certain fields associated with that value. And make any of them mandatory at that point as well.


author: Vijay Dadi
body: [@Julliane Chan](/t5/user/viewprofilepage/user-id/5517708) ,

Are you talking about Request Types, when you say category.

If you are looking for a way to show/hide fields depending on the values you are selecting, you can make use of Forms which will help you in your case.

If it is something else you are looking for, please provide more details.

Vj

comments: author: Julliane Chan
body: Hi Vijay,

I am not referring to request type instead just a custom field which we will use as the categorization (service catalog) for our tickets.

I will check the Forms. Thank you


author: Vijay Dadi
body: yes, you can attach your field on your form to a custom jira field.


author: Julliane Chan
body: It seems that I cannot use the cascading field in Forms


Tags: cloud

jira-service-management

jira-service-management-cloud