youngmon/atlassian-qna huggingface dataset:
Need to set/receive alert if JIRA ticket added to current Sprint
Asked by vishal vandre:

Hello Guys,

I am looking for Automation: Need to set/receive alert if JIRA ticket added to current Sprint


Answers:
author: Sushant Verma
body: Hi [@vishal vandre](/t5/user/viewprofilepage/user-id/5032072)   

You could use the trigger "Field value changed" for "Sprint" and then add a condition for "sprint in opensprints()".

It would look like this :   

![Project_automation_-_JIRA.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/236846i20F1A594A1E0C99C/image-size/large?v=v2&px=999 "Project_automation_-_JIRA.jpg")  

Screenshot taken from a similar question : <https://community.atlassian.com/t5/Jira-questions/Jira-Automation-get-notify-when-a-task-is-added-to-the-current/qaq-p/1390535>

<br />

Hope it will help!  

Regards,  
Sushant Verma
HMAC Signature mismatch
Asked by cm devops:

Hi,

I'm using this script to validate the webhook signatures.  
<https://confluence.atlassian.com/bbkb/bitbucket-cloud-python-sample-code-to-verify-webhook-signature-1346243949.html-1346243949.html>

When there is a colon : in the commit message (i.e., Test Commit : #1), script returns a mismatch in signature. Any suggestions to overcome this scenario?


Answers:
author: Suhas Sundararaju
body: Hi [@cm devops](/t5/user/viewprofilepage/user-id/5276179)   

The issue arises because the script removes whitespaces after the colon, causing the problem. To address this, I've modified the script to convert the payload data back to a single-line JSON string with separators ',' and ':', and to pretty print the original payload with payload_data, indent=2). This adjustment should resolve the issue.

Furthermore, I want to highlight that there may be a discrepancy in how Bitbucket Cloud calculates HMAC signature compared to how the script calculates it. You may need to modify the script accordingly. The ultimate goal is to convert JSON to a single line while removing whitespaces.

You can find the modified script at the following link: <https://confluence.atlassian.com/display/BBKB/Bitbucket+Cloud+-+Python+sample+code+to+verify+webhook+signature>

I hope this helps.

comments: author: cm devops
body: Thanks [@Suhas Sundararaju](/t5/user/viewprofilepage/user-id/4427897)

It works!


Tags: bitbucket-cloud

cloud

hmac

webhook
how to create multiple pipelines
Asked by Devanayaka, Mahesha (Cognizant):

is it possible to create multiple pipelines?


Answers:
author: Ben
body: Hi Devanayaka,

Welcome to the Bitbucket Cloud community!

May I ask you to clarify please what is meant by "multiple pipelines"? Are you wishing to trigger multiple pipelines at once from a single action such as a repository push, do you wish to define multiple different pipelines within your YAML configuration, or do you wish to run pipelines in parallel to each other?

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
Bitbucket Pipeline ModuleNotFoundError
Asked by Saad Naveed:

I get below error when running on Bitbucket Pipeline:  
test/unit/test_utils.py:2: in <module>  
from my_app.utils import hash_password  
E ModuleNotFoundError: No module named 'my_app'


Answers:
author: Syahrul
body: G'day, [@Saad Naveed](/t5/user/viewprofilepage/user-id/5492171)

The error message "ModuleNotFoundError: No module named" typically happens when the module it tries to access can't be located. This is not a pipeline issue but rather your config.

I suggest checking the following documentation on the possible solution:

[ModuleNotFoundError: no module named Python](https://www.javatpoint.com/modulenotfounderror-no-module-named-python#:~:text=Solution%20for%20ModuleNotFoundError%3A%20no%20module%20named%20Python&text=Use%20the%20appropriate%20capitalization%20and,of%20Python%20you%20are%20using.)  
[ModuleNotFoundError: no module named Python Error \[Fixed\]](https://www.freecodecamp.org/news/module-not-found-error-in-python-solved/)

Regards,  
Syahrul


Tags: bitbucket-cloud

cloud
mount a disk to the image in the pipeline
Asked by Stan van den Broek:

Hello,

I'm trying to mount a disk to the image in the pipeline.

I was able to mount the disk from the host to the runner. Now I want to mount it on the image that is started/build in the pipeline.

How to do this if it is even possible?

Maybe there is another solution. The thing I want to achieve is the following:

1. One disk with all the software we want to install.

2. Disk is not available for all servers (customers)

3. Upload the file to the remote server (Linux(SSH) \& Windows(WinRM) systems)

For linux systems we now use the following workaround:

We first delegate the an Ansible task to upload from the Docker host to the Pipeline image to the remote system. We can't get it working for Windows because of the Ansible login methode.

Any help would be great!

```
image:
    name: ******.dkr.ecr.eu-west-1.amazonaws.com/ansible:***

pipelines:
  default:
   - parallel:
   - step:
       name: Syntax check
       runs-on: self.hosted
       script:
         - chmod o-w .
         - ansible-playbook customers/playbooks/*.yml --syntax-check
```


Answers:
author: Patrik S
body: Hello [@Stan van den Broek](/t5/user/viewprofilepage/user-id/4598737) ,

thank you for reaching out to Community.

I'm afraid it's not currently possible to mount directories inside the runner's build containers. We do have a feature request with our development team to implement this functionality :

* <https://jira.atlassian.com/browse/BCLOUD-21252>

If you would be interested in that feature, feel free to add your vote and also mark yourself as a watcher to be notified of any future updates.

While that feature is not available, I can think of the following workaround that may help :

* Use **rsync** of **scp** tools to copy the files from the host during runtime
* Use [Linux shell runners](https://support.atlassian.com/bitbucket-cloud/docs/set-up-runners-for-linux-shell/): Different than Linux docker runners, the Linux shell runners run directly in a shell session on the host machine (no containers involved). This means it will have access to the full resources of the host, and you can essentially execute any command as you would normally do in a shell session on the machine where the runner is being executed.

Hope that information helps! Should you have any questions, feel free to ask.

Thank you, [@Stan van den Broek](/t5/user/viewprofilepage/user-id/4598737) !

Patrik S


Tags: bitbucket-cloud

cloud
ValueError: Please specify a container name when using atlassian/azure-storage-deploy:2.2.1 pipe
Asked by Maruf:

**ValueError: Please specify a container name when using**atlassian/azure-storage-deploy:2.2.1 pipe

yml

- step:  
name: Deploy to Azure  
deployment: Production  
script:  
- pipe: atlassian/azure-storage-deploy:2.2.1  
variables:  
SOURCE: 'build'  
DESTINATION_STORAGE_ACCOUNT_NAME: '<https://xxxxxxxx.blob.core.windows.net>'  
DESTINATION_SAS_TOKEN: $SAS_TOKEN3  
DESTINATION_CONTAINER_NAME: '$web'   
DEBUG: 'true'  

We have tried using escape character ('///$web' and '//$web') to take the name $web but we get the same error


Answers:
author: Igor Stoyanov
body: [@Maruf](/t5/user/viewprofilepage/user-id/5490618) hi. Have you tried this solution:

```
'\$web'
```

according to [Escape character Bash](https://www.gnu.org/software/bash/manual/html_node/Escape-Character.html#:~:text=A%20non%2Dquoted%20backslash%20'%20%5C,is%20the%20Bash%20escape%20character)  

Regards, Igor


author: Mark C
body: Hi [@Maruf](/t5/user/viewprofilepage/user-id/5490618),

Welcome to the community.

Before the Pipe script, would you be able to print the **$web** environment variable to ensure it is not empty?

```
- echo $web
```

Also, could you try to use a static string name and see if the Pipe is running after that?

Regards,  
Mark C

comments: author: Igor Stoyanov
body: [@Mark C](/t5/user/viewprofilepage/user-id/1210823) . It is not an environment variable, it is the default name of [Azure Storage Container.](https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website)  

Regards, Igor


Tags: azure

bitbucket-cloud

bitbucket-pipelines

cloud

pipes

storage
How to react on build state change?
Asked by Roth, Thomas:

Hi together,

i would like to trigger a groovy script in bitbucket when a build state is set to success or failure, but i found no event to react on at scriptrunner listener --\> custom listener. Has someone an idea?

Thank you!


Answers:
author: Roth, Thomas
body: solved by myself.

for a reason i don't know the  
RepositoryBuildStatusSetEvent  
can not be chosen as trigger, but i used the parent class  
ApplicationEvent  
and used the code  
if (applicableEvent instanceof RepositoryBuildStatusSetEvent) {...  
not very nice but works.


Tags: bitbucket-data-center

build

data-center

groovy

scriptrunner
Resource not found Return to the previous page or go back to your dashboard.
Asked by Claudia Perez:

Buenas,

Me han invitado a un workspace y he aceptado la invitaci?n, pero una vez que voy a entrar al workspace me sale el siguiente error: "Resource not found  
Return to the previous page or go back to your dashboard.", he intentado abandonar el workspace para que volviesen a incluirme y probar pero tampoco me deja salir de ?l.

Espero su respuesta,

Gracias, un saludo,

Claudia


Answers:
author: Ben
body: Hi Claudia,

Are you trying to access a certain repository via URL? If you do not have access to this repository, you will receive this error message, so I would avoid using the direct URL and instead selecting the workspace that the repository belongs to and determining which repositories you have access to under this workspace:

1. Click your avatar in the top-right corner
2. Select **All Workspaces**from the dropdown and then click on the workspace that the repository belongs to
3. If you do not see the repository once you've selected the workspace, the repository may either belong to a different workspace or you may not have access to it

If you are unable to find the repository - I would suggest checking the path to the repository from your local configuration (ie workspaceID/reposlug) by checking your remote URL configuration:

```
git remote -vvv?
```

Once you have the path, you can access the repository directly with the following URL:

```
https://bitbucket.org/workspaceID/reposlug
```

If this still does not work - I would recommend reaching out to a workspace administrator for further assistance.

Hope this helps.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
SAM local fails to run containers inside pipeline
Asked by viktor_varju:

I have updated from python3.9 runtime with to 3.11. For my pipeline I use an image based on python:3.11-alpine. I have aws-sam version 1.115.0 installed. I run integration test based on exported postman collections. The sam build inside pipeline succeeds. The sam local start api command also works. The first few requests to my lambda functions are successful. After that every request returns with 502 from the lambdas. From the pipelines docker sections I get this log, which I think is responsible for this issue:

level=error msg="AuthZRequest for GET /v1.35/distribution/public.ecr.aws/lambda/python:3.11-x86_64/json returned error: authorization denied by plugin pipelines: "

When I run the test locally everything works fine. I will really appreciate some input on solving this issue. Thanks.


Answers:
author: viktor_varju
body: Turns out SAM was making request to pull the latest Lambda images from AWS public ecr. I guess there is some sort of rate limiting mechanism in Bitbucket pipelines causing only the first few pulls to succeed from ecr. I solved the issue by starting SAM with --skip-pull-image option.


author: Theodora Boudale
body: Hi Viktor and welcome to the community!

We have restricted certain options for Docker commands in builds running on Atlassian's infrastructure for security reasons. You can take a look at our documentation, the restricted commands are listed in the section "**Full list of restricted commands**":

* <https://support.atlassian.com/bitbucket-cloud/docs/run-docker-commands-in-bitbucket-pipelines/#Running-Docker-commands>

Based on the error message, it looks like the Docker containers are started with one of the options we do not allow.

Can you see in the build log the exact docker command that is running and giving this error? Or is there any additional output in the build log to indicate what option is causing this error?

If the **docker run** commands cannot be configured in order to remove the restricted option(s), you can look into running this step on your own infrastructure with one of our self-hosted runners:

* <https://support.atlassian.com/bitbucket-cloud/docs/runners/>

The restrictions we have only apply to the pipelines executed on our cloud infrastructure, they do not apply to self-hosted runners.

If you use a self-hosted Linux Docker runner, you will need to use a custom docker-in-docker image for the docker service so that you don't get the same error:

* <https://support.atlassian.com/bitbucket-cloud/docs/configure-your-runner-in-bitbucket-pipelines-yml/#Custom-docker-in-docker-image>

Please feel free to reach out if you have any questions.

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

docker

sam
Cannot leave abandoned workspace
Asked by Zergsoft:

I have gone to workspaces and clicked the "leave" button and get a success message. However, the workspace still appears. I have seen this question raised many times and it looks like this has to be done by manually posting a question, so here it goes. The workspace I am trying to leave begins with "cm". Thanks in advance for your help!


Answers:
author: Ben
body: Hi Zergsoft,

I have just refreshed your workspace membership as I could see that you belonged to a stale workspace. Please perform a browser refresh and attempt to load your workspace list again - it should no longer be present :)

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
How do I get my email off the suppression list: I'm not receiving verification email
Asked by Zachary Morrow:

I'm trying to login/sign up to Atalssian using a new work email account \<domain_edited_for_privacy\> and I am not receiving the verification email.

I've checked and rechecked, it is not in the Junk Email folder either, and the email account is active (able to send and receive emails) but was only recently operational and likely bounced the first verification email. I cannot login/sign up to any Atlassian products currently.

I am using a personal email to ask this question.


Answers:
author: Zachary Morrow
body: Never mind my work was able to fix it.


Tags: bitbucket-cloud

cloud
Style issue in bitbucket when we click deployments tab and click help button
Asked by Vidhya T R:

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


Answers:
author: Patrik S
body: Hey [@Vidhya T R](/t5/user/viewprofilepage/user-id/5491007) ,

thank you very much for reporting this!

I went ahead and created a public bug with our development team to share this feedback on the UI bug :

* <https://jira.atlassian.com/browse/BCLOUD-23228>

I would suggest you to add your vote there, since this helps both developers and product managers to understand the impact. Also, make sure you add yourself as a watcher in case you want to receive first-hand updates from that ticket. Please note that all bug fixes are implemented with [this policy](https://confluence.atlassian.com/support/atlassian-cloud-bug-fix-policy-206865884.html) in mind.

Thank you, [@Vidhya T R](/t5/user/viewprofilepage/user-id/5491007) !

Patrik S


author: Vidhya T R
body: Issue may be less Z index


Tags: bitbucket-cloud

bug

cloud

style
bitbucket pipelines build is not working correctly
Asked by sschroders:

Hi,

I have a react site which i want to build and deploy using bitbucket pipelines. my pipeline runs and deploys the content of the dist folder in what seems to be correct manner. the correct files appear on my azure storage. however when i try opening the site I get the following error:

Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "application/octet-stream". Strict MIME type checking is enforced for module scripts per HTML spec.

I am using yarn and vite.

image: node:20.11.1 #atlassian/default-image:3

definitions:  
caches:  
yarn: node_modules

pipelines:  
branches:  
master:  
- step:  
name: 'Build'  
caches:  
- yarn  
script:  
- echo "Your build and test goes here..."  
- yarn  
- yarn build  
artifacts:  
- dist/\*\*


Answers:
author: Igor Stoyanov
body: [@sschroders](/t5/user/viewprofilepage/user-id/4412281) hi. New version [azure-storage-deploy:2.4.0](https://bitbucket.org/atlassian/azure-storage-deploy/src/2.4.0/) released, which will automatically guess the content-type of files.  

Please, provide feedback if this version solved your problem.  

Regards, Igor

comments: author: sschroders
body: thanks


author: sschroders
body: Edit after some digging I found out the problem is with the deploy as it deploys everything with the wrong content type (application/octet-stream) I am using atlassian/azure-storage-deploy:2.2.1 pipe to deploy.

comments: author: sschroders
body: [@Igor Stoyanov](/t5/user/viewprofilepage/user-id/4550492) any chance you can help me with this?


author: Igor Stoyanov
body: [@sschroders](/t5/user/viewprofilepage/user-id/4412281) hi. Azure automatically set the default application/octet-stream content type. I will try to provide a solution for this case in future releases.  

Regards, Igor


Tags: bitbucket-cloud

cloud

pipes
Can we add a custom check on repository before merge of pull request in bitbucket ?
Asked by Sai Krishna:

when ever a new table is created, we wanted to make sure that table is added to tblOrgTablesList


Answers:
author: Patrik S
body: Hello [@Sai Krishna](/t5/user/viewprofilepage/user-id/3387701) ,

thank you for reaching out to the Community!

Since the validation you are looking to implement is very custom, I would suggest two possible approaches that could help :

* *Using **Forge** to create a custom merge check* :   

  Forge is an Atlassian extensibility framework that can be used in Bitbucket Cloud to create apps for custom merge checks in your pull requests. You can learn more about Forge and some example apps to use as reference in the following articles:
  * [Forge for Bitbucket Cloud](https://bitbucket.org/blog/forge-for-bitbucket-cloud)
  * [Forge - Example apps Bitbucket Cloud](https://developer.atlassian.com/platform/forge/example-apps-bitbucket/)
* *Using **Bitbucket Pipelines** to run a script that validates the code:* Bitbucket Pipelines is a CI/CD service built into Bitbucket. It allows you to automatically build, test, and deploy code based on a configuration file in your repository. You can use Pipelines to run a script that checks for your specific conditions before merging :   

  ```
  pipelines:
    pull-requests:
      '**': # This means this will run for all branches
        - step:
           name: "Check New Table"
           script:
             - bash check_new_table.sh
  ```

  Where the check_new_table.sh script would need to be coded according to the repository's structure and requirements of the validation you are looking for.

Both methods would require the creation of custom scripts developed specially for your project's specific needs and structure.

Hope that helps! Should you have any questions, feel free to ask.

Thank you, [@Sai Krishna](/t5/user/viewprofilepage/user-id/3387701) !

Patrik S


Tags: bitbucket-cloud

cloud
Ability to move Secured Repository Variables to Deployment Variables
Asked by Bitwise DEVS:

Having a way to move secured repository variables to deployment variables will be great specially when migrating to premium plan so that we do not need to recover or generate new API keys or secrets when the team is just updating the workflow.


Answers:
author: Syahrul
body: G'day, [@Bitwise DEVS](/t5/user/viewprofilepage/user-id/3162676)

To clarify, are you looking to migrate from a secure repository variable to deployment variables without needing to recreate everything from scratch?

If so, could you please share more details about this requirement and the specific scenarios where you see this beneficial? This information will enable me to better articulate a feature request on your behalf.

Thanks!  
Syahrul

comments: author: Bitwise DEVS
body: It would be a much better user experience specially if we already forgot the keys so we no longer need to recover it again or generate a new one. This is very crucial to not waste time specially if there is **many environment to set up**.


author: Syahrul
body: Hey [@Bitwise DEVS](/t5/user/viewprofilepage/user-id/3162676)

Noted! I have raised a feature request on behalf of you at

<https://jira.atlassian.com/browse/BCLOUD-23265>

Please Vote and Watch them so that you'll receive an update in the future if we have any.

Regards,  
Syahrul


author: Bitwise DEVS
body: Thanks a lot!


Tags: bitbucket-cloud

cloud
Invitation is not actually sending the email to designated user
Asked by Josh:

I'm trying to add a user to my bitbucket by invitation but the email is not being received by the recipient.  
The user was earlier added and got deleted accidentally and since then I could not invite the user to the platform.

Please help


Answers:
author: Syahrul
body: G'day, [@Josh](/t5/user/viewprofilepage/user-id/5490362)

To begin, can you please confirm if there are any pending invitations when you navigate to workspace settings and click on User Groups? If there are no pending invitations, you can re-invite the user by clicking on "**Add members**" and inputting the user's full email address and group. Then, select "confirm" to send the invitation.

Please ask the user to check their mailbox, spam folder, or any other folder in case the email was redirected. They should open the invite link and accept the invitation.

Let me know how it goes.

Regards,  
Syahrul


Tags: bitbucket-cloud

cloud
Fisheye session timeout units?
Asked by Jeff Blaine:

Re: <https://confluence.atlassian.com/fishkb/how-do-i-increase-the-session-timeout-period-665422123.html>

This article doesn't indicate what the integer for `session-timeout` IS. Minutes? Seconds? Hours? Days?


Answers:
author: Jeff Thomas
body: Hi Jeff,

The` session-time` property is set in minutes.


Tags: fisheye-crucible-administration
JVM input args
Asked by Onno van der Straaten:

*This question is in reference to Atlassian Documentation: [JVM system properties](https://confluence.atlassian.com/pages/viewpage.action?pageId=298976942)*

system.properties file does not seem to work. Is there a known and documented way to change JVM input arguments?

Documentation states it is the recommended way to change input JVM args but this recommended way is also not working.

THere is at lof of documentation describing but most/all seems outdated/not working.

I was sort of expecting this to be easy to do but as it turns out this will take hours just to find out how it works.


Answers:
author: Marcin Figura
body: I am struggling with the same case. I created file : system.properties and System Info JVM input arguments does not show any args added.   

Second method suggested is to pass `-D` parameter to the JVM using the `FISHEYE_OPTS`. This seems to work in a way that at least I can see parameter in java process:  

# jps -lvm

15547 /opt/fecru/latest/fisheyeboot.jar start -Xmx4096m -Dfisheye.library.path= -Dfisheye.inst=/opt/fecru/latest -Djava.awt.headless=true -Djava.endorsed.dirs=/opt/fecru/latest/lib/endorsed **-Dcrucible.review.content.size.limit=1200** -Dfisheye.library.path= -Dfisheye.inst=/opt/fecru/fecru-data -Djava.awt.headless=true -Djava.endorsed.dirs=/opt/fecru/latest/lib/endorsed

But, still System Info page does not show any arguments in JVM input field


Tags: jvm