youngmon/atlassian-qna huggingface dataset:
`Build and Test` NOT pickup the npm ERR during npm run buil and render as passed on CI
Asked by vincent:

\`Build and Test\` NOT pickup the npm ERR during npm run buil and render as passed on CI

it shows as Finished task 'Run Build' with result: Success, but when look inside the log we found npm error in one of the task of the npm run build (lerna)

```
npm ERR! code ELIFECYCLEerror	16-Aug-2019 08:31:34	npm ERR! errno 1error	16-Aug-2019 08:31:34	npm ERR! @lint-ui/ui@20.0.0 build:packages: `lerna run build --stream --concurrency 10`error	16-Aug-2019 08:31:34	npm ERR! Exit status 1error	16-Aug-2019 08:31:34	npm ERR! error	16-Aug-2019 08:31:34	npm ERR! Failed at the @lint-ui/ui@20.0.0 build:packages script.error	16-Aug-2019 08:31:34	npm ERR! This is probably not a problem with npm. There is likely additional logging output above.error	16-Aug-2019 08:31:34	error	16-Aug-2019 08:31:34	npm ERR! A complete log of this run can be found in:error	16-Aug-2019 08:31:34	npm ERR!     /root/.npm/_logs/2019-08-16T15_31_34_121Z-debug.logerror	16-Aug-2019 08:31:34	ERROR: "build:packages" exited with 1.error	16-Aug-2019 08:31:34	npm ERR! code ELIFECYCLEerror	16-Aug-2019 08:31:34	npm ERR! errno 1error	16-Aug-2019 08:31:34	npm ERR! @lint-ui/ui@20.0.0 build: `run-s clean bootstrap build:**`error	16-Aug-2019 08:31:34	npm ERR! Exit status 1error	16-Aug-2019 08:31:34	npm ERR! error	16-Aug-2019 08:31:34	npm ERR! Failed at the @lint-ui/ui@20.0.0 build script.error	16-Aug-2019 08:31:34	npm ERR! This is probably not a problem with npm. There is likely additional logging output above.error	16-Aug-2019 08:31:34	error	16-Aug-2019 08:31:34	npm ERR! A complete log of this run can be found in:error	16-Aug-2019 08:31:34	npm ERR!     /root/.npm/_logs/2019-08-16T15_31_34_142Z-debug.logsimple	16-Aug-2019 08:31:35	Finished task 'Run Build' with result: Success
```


Answers:
author: Jimmy Seddon
body: Hi [@vincent](/t5/user/viewprofilepage/user-id/3530573) ,

Welcome to the Community!

What type of task are you using to run the npm build? I have seen cases where using a script task will report a success if you don't catch and throw the npm error as the "script" exited cleanly and that is what was reported as the success.

I hope that helps!

-Jimmy

comments: author: vincent
body: Thanks Jimmy for the response, I'm running \`

```
lerna run build --stream --concurrency=10
```

\`


author: Jimmy Seddon
body: That looks like you are running an inline script task?

If so you might want to add some error handling to catch the npm error and throw an exception and break execution, which should send a failure signal to the bamboo agent running that job.

I hope that helps!

-Jimmy


author: vincent
body: ok thx, will give it a try, my understanding of how Bamboo CI agent catch up error is by only looking at the exit status \>0, is that right?
How can I configure Bamboo to use git via HTTPS?
Asked by dolan:

We have a self hosted bitbucket instance, and a self hosted bamboo server, and I want to be able to pull code using bamboo. However, ssh is disabled at an organizational level, and I figured I would be able to pull code over https. I can't find any way to do this, am I missing something?

I have a username and password in shared credentials, and manually set up a linked git repository using \`https:....\`

```
error: cannot spawn sh: No such file or directory
error: cannot spawn sh: No such file or directory
fatal: Authentication failed for ${repository url}
```

Any tips for getting this to work?


Answers:
author: Alexey Chystoprudov
body: It works only if you configure pure Git repository at Bamboo side, not Bitbucket Server repository type.

comments: author: dolan
body: Thanks for your reply, but that's what I have done. You call it a "pure git repository" but I referred to it as "linked git repository." I believe we are talking about the same thing. I am puzzled why if "cannot spawn sh" then it says "authentication failed for repo" and it locks the account after 5 tries.


author: Alexey Chystoprudov
body: What Bamboo says when you click Test connection button on linked repository setup?


author: dolan
body: ```
error: cannot spawn sh: No such file or directory
error: cannot spawn sh: No such file or directory
fatal: Authentication failed for 'https://{shared_credentials_account_name}@{repo_host}/scm/{project}/{repo_name}.git/'
```

To be clear, on this linked repository I have the following:

Repository host: Git

Could this possibly be related to how I had configured as Bitbucket Cloud server before? I noticed this morning under Build Resources \> Repository Settings, the repo had a ssh url, so I deleted the cache directory, but it didn't fix the issue. The new "cache directory" has an https url, as expected, but doesn't change the output of "test connection." Maybe I have a lingering config... (git remote?) I will dig around tomorrow. I am probably stupid and need to add "sh" to path on the bamboo server :)


author: Alexey Chystoprudov
body: I would suggest you to create support request at support.atlassian.com and help our engineers to gather more info about your environment and provide solution.


Tags: bitbucket

bitbucket-server

server
Distinguish between plan triggers during runtime
Asked by Henrik Eriksson:

Is there any way to read variable/parameters from bamboo during runtime to know determine during the build of a build plan, how the build plan was triggered.

Was the trigger according to schedule? Or due to code change in repository.

We are using cake build, with powershell boostrapper, and would like to make decision in the build file based on this input.


Answers:
author: Rafael Pinto Sperafico
body: Hi [@Henrik Eriksson](/t5/user/viewprofilepage/user-id/2442271) ,

If the "*during runtime*" you are referring to relates to whilst the build is running, I am afraid you will not be able to gather this information from outside the build. When running a build, Bamboo creates a child process from its actual process, preventing you from doing changes and retrieving information from external location.

You could run a REST API call against:

* rest/api/latest/result/PROJ-PLAN-1?expand=metadata
* rest/api/latest/result/PROJ-PLAN-JOB1-1?expand=metadata

Or simply run a SQL statement against *buildresultsummary* table.

Kind regards,  
Rafael
License strategy for open source development?
Asked by rkenney525:

Hey all, this is my first post so apologies if this is the wrong venue / doesn't belong here or is otherwise a stupid question. Figured I'd ask the community [before bothering Atlassian](https://www.atlassian.com/purchase/?purchaseMode=quote).

I'm currently working with Bamboo for one of my customers, specifically using the [per-build-container plugin](https://bitbucket.org/atlassian/per-build-container/src/master/). There are some enhancements I'd like to try my hand at and see if the owners are interested, but this is something I'd like to do in my own time, and therefore not use my client's licences.

I technically could get by on an eval license, but I'm not *really* evaluating it so that seems wrong. The [starter license](https://www.atlassian.com/software/bamboo/pricing) would be perfect, but I specifically need like 2 or 3 remote agents in order to properly test. Has anyone else had this problem? Is there a secret open source contributor license I haven't found or does everyone else just rely on their company to provide licenses?


Answers:
author: Nic Brough -Adaptavist-
body: You can ask Atlassian for an open source licence over at <https://www.atlassian.com/software/views/open-source-license-request>

comments: author: rkenney525
body: This looks like exactly what i want, thanks!


author: Alexey Chystoprudov
body: Atlassian SDK allows you to run Bamboo with developer time limited license. It's about 1 hour of license which allows several remote agents. Should be enough for debug.

*atlas-debug* command inside your plugin root folder should execute Bamboo with plugin installed and dev license enabled


Tags: app

licence

open-source
question about 'conditional task'?
Asked by csun@greenmountaintechnology.com:

Is there a tutorial to show how to run conditional task, I need to use it for both building and deployment?

And is there a slack community for people using Bitbucket products to discuss?


Answers:
author: Steffen Opel _Utoolity_
body: As far as I know there is no tutorial for the [Conditional tasks for Bamboo](https://marketplace.atlassian.com/apps/1219706/conditional-tasks-for-bamboo) app, which at this point is still listed as *unsupported* under Atlassian Labs. Please watch and vote for the following issue to further increase Atlassian's priority for an official solution regarding this highly voted feature request (which would also imply resp. documentation and/or tutorials):

* [Conditional build step depending on value (or existence) of variable (BAM-11257)](https://jira.atlassian.com/browse/BAM-11257)

That said, you can find more details about how this app works in [@Daniel Santos](/t5/user/viewprofilepage/user-id/502125)' excellent answer to [How we can configure job with conditional tasks for bamboo Plug-in?](https://community.atlassian.com/t5/Bamboo-questions/How-we-can-configure-job-with-conditional-tasks-for-bamboo-Plug/qaq-p/1105461)

As for a Bitbucket Slack community, I'm not aware of one, but would recommend to ask this as a separate question in the [Bitbucket](https://community.atlassian.com/t5/Bitbucket/ct-p/bitbucket) category here. The category also allows you to start a [Bitbucket discussion](https://community.atlassian.com/t5/Bitbucket-discussions/bd-p/bitbucket-discussions) btw., though obviously in a slightly less interactive fashion than via a Slack channel ;)


Tags: condition
"Custom revision" how does it work?
Asked by Henrik Eriksson:

Does it work with setting git tag on current commit? Does it do anything relate to git tag?


Answers:
author: Henrik Eriksson
body: So you mean that Custom revision never sets any value. Only read.

So e.g. if there is a git tag with version x.y.z, and custom build does target that build, then a checkout of that commit is done.

If there is a custom build with custom version q.w.e and there is no version information related to it, then the build should fail(?)


author: Steffen Opel _Utoolity_
body: A "custom revision" is related to [Running a customized manual build](https://confluence.atlassian.com/bamboo/running-a-plan-build-manually-289276898.html#Runningaplanbuildmanually-Runningacustomizedmanualbuild), where you can not only override [Bamboo variables](https://confluence.atlassian.com/bamboo/bamboo-variables-289277087.html), but also "Choose the revision of the default repository that should be used".

So instead of implicitly running the latest revision when running a build manually, you can explicitly specify an older revision to (re)create a build artifact based on previous versions etc.:

![](https://confluence.atlassian.com/bamboo0602/files/938865775/938866099/1/1507883031750/RunCustomisedBuild.png)
Exclude changeset for [skip ci] not working
Asked by Felipe Di Bernardi S. Thiago:

I'm currently using Bamboo version 6.9.2 build 60911 and have been facing a problem with the exclude changeset property on linked repositories.

I've need to exclude any commits starting with \[skip ci\] and have tried the following regex, all to no avail:

.\*skip\\sci.\*

\[sS\]skip ci\[sS\]

.\*skip ci.\*

(.)\*skip ci(.)\*

Does anyone have any idea why are this regex not working?

Thanks in advance,


Answers:
author: Felipe Di Bernardi S. Thiago
body: After extensive search and the good and ol' try everything you've got, I found the regular expression that made my day:

(.)\*skip ci(.)\*\\n

Hope this helps someone in the same situation!

comments: author: Karthik
body: Hi Felipe,

It didn't work for me, I am pretty much exhausted with multiple regular expression. Can you or support team member confirm this fixed in the version you are using 6.9.2. If so i can update to the same, I am on [Bamboo](http://www.atlassian.com/software/bamboo/) version 6.9.1 build 60910 - 04 Jun 19.

Looking forward to hearing from you

Regards,

Karthik
How do I add more files, is it [{...}, {...}, {...}]
Asked by John Hull:

"files": \[  
{  
"pattern": "${bamboo.build.working.directory}/linux/drivers/hsm/ncipher/nshield_solo/nfp.ko",  
"target": "scratch/${bamboo.planKey}/${bamboo.buildNumber}/${bamboo.shortJobKey}/"  
}  
\]


Answers:
author: John Hull
body: json nested array, as I thought
Powershell Script from Bamboo output
Asked by garretfick:

Hi,

I am running a PowerShell script from Bamboo using the Script task. The script file is in the repo, so I'm running it using the "File" Script location:

\* Interpreter: Windows PowerShell

\* Script location: File

\* Script file: .\\build.ps1

I'm confident the file exists and is running. However, I don't get any of the output from the script. That is, when I run it locally on my machine, I gets detailed output in the terminal. But when I run on Bamboo, I get no output.

How can I get output when running on Bamboo?

In case, it helps, the commands in the PowerShell script are primarily calling other applications using "\&"


Answers:
author: Karel Miranda
body: Hi,

I was able to reproduce this issue using Powershell 4, so please try to upgrade Powershell to version 5.

I tested using Powershell 5.1.14409.1005 and it works :D

Hope this helps.


author: Edwin Kyalangalilwa
body: Hi [@garretfick](/t5/user/viewprofilepage/user-id/2191150) ,

Please try adding debugging at the top of script.

```
Set-PSDebug -Trace 2
```

Also what is writing output messages?

For example:

```
Write-Host "message"
```

comments: author: garretfick
body: I have added \`Set-PSDebug -Trace 2\`. When I run locally, I get output from each line, but when run via Bamboo, I see no output.

I have also added \`Write-Host\`, and it similarly gives no output.

In case it helps, the only message I do see is

```
Failing task since return code of [powershell -NonInteractive -ExecutionPolicy bypass -Command .\build.ps1] was -1 while expected 0?
```


author: garretfick
body: I can also add that if I change the name from \`build.ps1\` to \`build1.ps1\` (so the script doesn'tt exist), I instead get the message

```
File [XXXXXXX\build1.ps1] doesn't exist, trying to run [.\build1.ps1] anyway.Unable to find executable at .\build1.ps1. Will try to run it anyway.
```


author: andrew_lund
body: [@garretfick](/t5/user/viewprofilepage/user-id/2191150) Did you ever figure this out? I'm trying to do the same thing right now as well. \`Set-PSDebug -Trace 2\` didn't output anything to the Bamboo log files. I've tried messing around with powershell preferences but none of them seemed to help.


author: garretfick
body: I can't remember if I ever got logging working (and don't have access to the system anymore to check), but I do remember why things were failing.

The bamboo user account PATH environment variable had been modified, and so Powershell wasn't on the path.

I suspect this isn't related, but might be worth looking at.
Why Bamboo needs a database ? Is it required to have a Database ?
Asked by Amit Sahu:

Why we will need to have a database for Bamboo ?


Answers:
author: Mikael Sandberg
body: Hi [@Amit Sahu](/t5/user/viewprofilepage/user-id/3525899)

Welcome to the Atlassian Community.

The database is needed because Bamboo stores plan configurations and build results data in the database.

comments: author: Amit Sahu
body: Thanks Mikael !

It makes sense, But I was thinking it will store them locally in flat files.
Issue with - Push a docker image to docker container
Asked by lpandia:

I am using docker task to Push a docker image to docker container. I am targeting Azure Container Registry .Though I passed right 'username' 'password' I am getting an error.

I have given the error below;

```
unauthorized: authentication required
```


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

We will need to check your build logs to move forward on this one.

* Can you share the relevant part of it (where we see the docker command run)?  
  ??Please make sure you anonymize any private data before.
* Does it work using a script task?  
  This would be a very helpful troubleshooting step to identify where is the issue.
Executing script on bamboo
Asked by Aisha:

I want to execute a script file which is stored in the server where I would like my WAR files deployed. It is one of the tasks within the bamboo deployment. What should be my working directory?


Answers:
author: Edwin Kyalangalilwa
body: Hi [@Aisha](/t5/user/viewprofilepage/user-id/3519610) ,

Bamboo sets it's own working directory based on job key.

For example:

    /home/Bamboo-home/xml-data/build-dir/<job>

[Specifying Bamboo's working directory](https://confluence.atlassian.com/bamboo/specifying-bamboo-s-working-directory-289277246.html)

You can also paste your script in the Bamboo script task instead of referencing on server.

[Script Task](https://confluence.atlassian.com/bamboo/script-289277046.html)
I would like to retrieve the email addresses of email handlers in the automation process.
Asked by Dinonath Khan:

Hey There,

Could someone please assist me in retrieving the email handler's email ID as a smart value in the automation process?  

<br />

![Screenshot from 2024-05-30 19-33-25.png](https://community.atlassian.com/t5/image/serverpage/image-id/326987iA08B7F7238546DB9/image-size/large?v=v2&px=999 "Screenshot from 2024-05-30 19-33-25.png")  

<br />

<br />

The current process is as follows: when an email is sent to dina4184@outlook.com, a ticket is created in Jira Service Management.

My requirement is that if any email is received at dina4184@outlook.com, the request type should be set to "Avail Request."

Could someone please explain how to retrieve the email handler's email (dina4184@outlook.com) as a smart value in Automation? Alternatively, is there a way to directly assign the request type "Avail Request" to emails received at this particular email address?


Answers:
author: Rudy Holtkamp
body: Hi [@Dinonath Khan](/t5/user/viewprofilepage/user-id/5487871) ,

If you create an automation rule in the JSM project and use issue created as trigger and as condition: reporter = dina4184@outlook.com (assuming that is the default reporter stated in the mail handler).

You can use the 'Edit request type' action to set the request type to Avail Request.


Tags: jira-service-desk-cloud

jira-service-management

jira-service-management-cloud
Display all staff that are currently logged into the application
Asked by Abdelrahman Alfawaier:

Is there any way to have the ability to display all staff that are currently logged into the application in Jira Service Management Data Center?


Answers:
author: Mirek
body: Hi [@Abdelrahman Alfawaier](/t5/user/viewprofilepage/user-id/5479058)

I think this KB article might be helpful

<https://confluence.atlassian.com/adminjiraserver/monitor-a-user-s-activity-938847027.html>

Basically it requires checking Users Sessions list


Tags: data-center

jira-service-management

jira-service-management-data-center
How to add a text description about a project visible to all members?
Asked by Aust?ja Dapkut?:

I want to add some free-form text description for a project, for example if project is created for one company (one of our Clients), I would like to add some notes about the company and the contact information. Is there a way to do so in Jira? Thank you!


Answers:
author: Ugnius Au?ra
body: Hi [@Aust?ja Dapkut?](/t5/user/viewprofilepage/user-id/5509442) ,

Yes of course! One of the solutions would be to create custom fields.

Documentation - <https://support.atlassian.com/jira-cloud-administration/docs/create-a-custom-field/>

Also Greetings from Lithuania!

comments: author: Aust?ja Dapkut?
body: Hi, greetings:)   
As I understand, these fields are for each of the issue. I would like to add the general information for the whole project.


Tags: cloud

jira-service-management

jira-service-management-cloud
JQL for linked issue
Asked by Kamil Askerov:

Hi. I need to make the custom field in my project, where will be linked issues for this issue and the custom field must be not changeable (nobody can change this custom field(only copy them))

--For this i need JQL something like this - issue in linkedIssues(issue-number)

--But how to make this JQL for my custom field - wich parametr must be for issue-number?


Answers:
author: Christian
body: The best way I can think of to do this is to write an automation that triggers whenever and issue link is added or deleted. The automation should then use the "Lookup Issues" action to look up all linked issues, and then write them to a read only custom field. The automation will look like this:

![Screenshot 2024-05-31 141600.png](https://community.atlassian.com/t5/image/serverpage/image-id/327265i2CE80B1B7DFFDB8C/image-size/large?v=v2&px=999 "Screenshot 2024-05-31 141600.png")

![Screenshot 2024-05-31 141819.png](https://community.atlassian.com/t5/image/serverpage/image-id/327266iC009854C5D1E3411/image-size/large?v=v2&px=999 "Screenshot 2024-05-31 141819.png")

Note: You will need to create two automations, one that triggers when a link is added and one that triggers when a link is deleted. You may also need to update your the rule details to allow other automations to trigger it if you have automations that create links.

Let me know if this works for you!

Christian


Tags: cloud

jira-service-management

jira-service-management-cloud
Import custom field data for a cascading list
Asked by Beau Spree:

Hello,

I am adding a custom field (cascading list) to a request type and I want to add the values, which I can do manually. But I have 100's sometimes 1000's of values and I want to import these values. Is there a good way to import large custom field data into the system?

Thanks!


Answers:
author: Anusha A
body: Hi Beau Spree,

Welcome to Atlassian Community support and Thanks for your question!

Please refer to the following article that has the step by step instruction on how you can achieve this. You can refer to the section under "**Use the CSV Import feature" -**

* [How to bulk import custom field values for certain types of Custom Field](https://confluence.atlassian.com/jirakb/how-to-bulk-import-custom-field-values-for-certain-types-of-custom-field-827123935.html)

Hope that helps.

Regards,

Anusha A


Tags: cloud

jira-service-management

jira-service-management-cloud