youngmon/atlassian-qna huggingface dataset:
Is it possible if phpunit test failed on push to block the merge button?
Asked by Ivo:

Hi guys, Is that possible to be done in pipeline?  

On push we need to run phpunit and if the tests are failing we need to block the merge button.  

Below is my simple pipeline:  

```
      steps:      - step: &build          name: Build and run Composer          runs-on:             - 'self.hosted'            - 'linux.arm64'            - 'customlabel'        script:           - apt update           - apt install -y list-of-packages          - docker-php-ext-enable list-of-extensions          - docker-php-ext-install list-of-extentions          - curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer          - composer install          -  ./vendor/bin/phpstan          -  ./vendor/bin/phpunit                    - apt-get clean           - rm -rf /var/lib/apt/lists/* /tmp/pear        caches:          - composer      pipelines:        branches:           my-branch:            - step: *build 
```

<br />

Regards,


Answers:
author: Saxea _Flowie_
body: Hi [@Ivo](/t5/user/viewprofilepage/user-id/239502),

Yes, when your test fails and causes the pipeline to fail, it will mark the build as failed. You can define [merge checks](https://support.atlassian.com/bitbucket-cloud/docs/suggest-or-require-checks-before-a-merge/) for passing builds.

We also provide an [addon](https://flowie.app/) with build checks and additional merge checks not available on Bitbucket out of the box.

comments: author: Ivo
body: Thank you [@Saxea _Flowie_](/t5/user/viewprofilepage/user-id/5230209)

We know about the merge checks and the options but my colleagues are not able to merge:

The message is:

<br />

The following recommended pre-merge check did not pass:  
1+ approval from default reviewers

They selected from the merge settings

Minimum number of approvals 1

Minimum number of successful builds for the last commit with no failed builds and no in progress builds 1

Regards,


author: Saxea _Flowie_
body: Have you also selected '[Prevent a merge with unresolved merge checks'](https://confluence.atlassian.com/bbkb/why-a-pull-request-is-merged-despite-failing-the-merge-checks-1189479004.html)?


author: Ivo
body: Hi [@Saxea _Flowie_](/t5/user/viewprofilepage/user-id/5230209) ,  

No i haven't selected this option because this option is part of the Premium plan.   
You can see my configuration on the screenshot below.

![Screenshot from 2024-06-20 07-16-01.png](https://community.atlassian.com/t5/image/serverpage/image-id/330732i471D2A93CD161E63/image-size/large?v=v2&px=999 "Screenshot from 2024-06-20 07-16-01.png")

<br />

Regards,


author: Saxea _Flowie_
body: In order to block the merge using Bitbucket's built in checks you need premium. [Flowie](https://flowie.app/) can enforce merge checks on non-premium, but is also a paid addon. It does give you other functionality like PR labels, draft, additional checks, rebase support and more.


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
how to trigger the imported pipeline with custom variable export?
Asked by A Sai Shree Anjan:

Actual import pipeline in main project from shared pipeline.  

pipelines:  
custom:  
import-pipeline:  
import: bitbucket-shared-pipelines:main:set-environment-variables  
is there a way to trigger the imported pipeline based on branches like dev, qa along with assigning the custom variables during the build time.  


Answers:
author: Patrik S
body: Hello [@A Sai Shree Anjan](/t5/user/viewprofilepage/user-id/5522909) ,

and welcome to the Community!

My understanding is that you are importing a shared pipelines as a custom pipelines, and would like to have the ability to provide the value of the custom variables in the UI when triggering that pipeline. If that is the case, I'm afraid it's not yet possible, as this is currently a limitation on custom shared pipelines as per [Share pipelines configuration documentation](https://support.atlassian.com/bitbucket-cloud/docs/share-pipelines-configurations/) :
> ***Note:*** There is a known limitation with using Variables in Custom Pipelines that utilize a shared Pipeline Configuration. If a repository imports a shared Pipeline Configuration and uses it as part of a Custom Pipeline, variable values specified at runtime via the UI will ***not*** pass to the pipeline execution. Instead, the default values specified in the exported Pipeline configuration will be used instead.

We do have an enhancement request with our engineering team to include that functionality ([BCLOUD-22869](https://jira.atlassian.com/browse/BCLOUD-22869)). We encourage you to add your vote there to increase the visibility of that feature and to help our product team to understand the interest. You also have the option to mark yourself as a watcher to be notified of any future updates.

Thank you, [@A Sai Shree Anjan](/t5/user/viewprofilepage/user-id/5522909) !

Patrik S


author: Saxea _Flowie_
body: Hi [@A Sai Shree Anjan](/t5/user/viewprofilepage/user-id/5522909)

Not sure if I understood you question correctly, but we do support a more flexible way of triggering pipelines via our [addon](https://flowie.app/docs/en/plugins/pipelines) which might be helpful to your question.


author: A Sai Shree Anjan
body: Along with the import I want to export few variables, is it possible ?


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

pipeline
Removing all approvals from a PR manually
Asked by Leon Geldschlager:

Is there a way to manually remove all approvals from a PR? I know that there's a feature to automatically remove them on each push but for some minor changes I don't want to remove approvals while for others I want people to reapprove them.

Is that possible?


Answers:
author: Saxea _Flowie_
body: Hi [@Leon Geldschlager](/t5/user/viewprofilepage/user-id/5523123)

No, each user has to remove their approval either manually or using the API. Even when using the API it has to be called using the actual approver credentials.

I guess, another question would be how you define what is a minor change. Would that be up to the author to decide when re-approval is required? I'm interested because we provide solutions to these kind of automations via [Flowie](https://flowie.app/), a Bitbucket addon we provide.

comments: author: Leon Geldschlager
body: Yeah I was thinking it would be up to the author to decide when something needs reapproval. Otherwise it would be hard to define the difference between a minor and major change.


author: Saxea _Flowie_
body: I see, we have no support for this yet, but is something that we can certainly add as custom action for you. Could also setup so it just resets one of the approvals instead of all of them. You can contact us on support@flowie.app and we can assist you from there.

Also as a possible alternative, we have a [merge check](https://flowie.app/docs/en/plugins/no-unresolved-comments) that ensures all comments are addressed, even if the commenter has already approved the PR. Flowie also keeps track of the [comments resolution state](https://flowie.app/docs/en/enhanced-pull-request-search#review-progress) in the PR search view. However, it doesn't solve the scenario where the author makes changes that is not related to any comments and wants someone else to review it.

Note that there's also a feature request [here](https://jira.atlassian.com/browse/BCLOUD-13893) for this.


Tags: bitbucket-cloud

cloud
Bug: Loss of new lines when copying code from diff block
Asked by Aliaksei Belapko:

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

[demonstration of the issue](https://drive.google.com/file/d/1GnM753eHAY2f2NtwQqMgkWrEf1No-_-p/view)


Answers:
author: Patrik S
body: Hello [@Aliaksei Belapko](/t5/user/viewprofilepage/user-id/5522886) ,

thank you for reaching out!

I've raised an enhancement request with our development team to include the new line characters when copying the diff :

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

I would suggest you to add your vote there, since this helps both developers and product managers to understand the interest. 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 features are implemented with [this policy](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html) in mind.

Thank you, [@Aliaksei Belapko](/t5/user/viewprofilepage/user-id/5522886) !

Patrik S

comments: author: Aliaksei Belapko
body: [@Patrik S](/t5/user/viewprofilepage/user-id/4603309), thank you?


Tags: bitbucket-cloud

cloud

diff

pull-request
Is it possible to use Okta for 2FA with Bitbucket Cloud without Atlassian Cloud?
Asked by Jay Seletz:

We currently use Atlassian Cloud to manage our cloud Jira and Confluence, and also to manage our Bitbucket Cloud workspace users and enforce 2FA via a corporate Okta account.

Our Jira and Confluence projects are migrating to self-managed Data Center, but we are keeping our Bitbucket.org workspace. Our Atlassian Cloud will thus be going away.

I know we can enforce 2FA in our workspace and require user's to self-configure an acceptable mobile client app in place of our current Atlassian Cloud/Okta. My question is if it is possible to use an existing corporate Okta account with a Bitbucket.org workspace without Atlassian Cloud. We do have a Bitbucket Cloud Premium subscription.

Thanks.


Answers:
author: Mark C
body: Hi [@Jay Seletz](/t5/user/viewprofilepage/user-id/3570383),

Thank you for reaching out to the community.

Unfortunately, it is not possible to use Okta SSO without Atlassian Cloud.  
This is because Bitbucket Cloud logins are unified with Atlassian accounts, and the only way to manage Atlassian accounts is through the Atlassian cloud.

Regards,  
Mark C


Tags: bitbucket-cloud

cloud

okta
Jenkins pipeline failing with karma and firefox killing issue.
Asked by sai chunduri:

sharding specs across 1 browser

karma v3.0.0 server started at <http://0.0.0.0.:9876/>

starting browser firefox

firefox have not captured in 300000ms, Killing firefox was not killed in 2000ms, Sending SIGKILL

firefox was not killed by SIGKILL in 000ms , continuring

I am facinf this issue after that pipeline is failing ,Kindly help me to fix this issue.


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

You posted your question in Atlassian's Bitbucket community. However, I do not see a Bitbucket Cloud account with your email address, and the title of your post also mentions Jenkins.

Jenkins is not an Atlassian product, so I'm afraid that we can't offer any guidance on how to troubleshoot your build.

I would suggest reaching out to the Jenkins community to ask for info on how to troubleshoot your failed build. Some platforms where you can ask for help are listed in the Jenkins site here:

* <https://www.jenkins.io/participate/help/>

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Why Not able to access these repo in eclipse? i am getting authentication error.
Asked by Abhijit Shinde:

When I use Clone Url to import repository to in eclipse, that i put correct creditional put i am getting error authentication failed


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

Are you using your account's password when you are asked for credentials?

We have deprecated the use of account passwords for Git over HTTPS and API:

* <https://community.atlassian.com/t5/Bitbucket-articles/Announcement-Bitbucket-Cloud-account-password-usage-for-Git-over/ba-p/1948231>

Your account's password can be used only for logging in to <https://bitbucket.org/> from browser. If you want to clone, pull, or push to a repo with basic authentication over HTTPS, you can generate an app password for your account and use that instead of a password:

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

The app password should be used along with your username, which can be found here:

* <https://bitbucket.org/account/settings/>

If the username is already included in the clone URL, you don't need to enter it anywhere else. If the clone URL doesn't include your username and you get asked for a username as well, you should use the username listed here <https://bitbucket.org/account/settings/>.

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

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
The phenomenon that the pipeline runner is evicted whenever the stdout log / artifacts become vast
Asked by Jiwon Jeon:

When the stdout log in the pipeline runners / artifacts become massive, the runner pods are continuously evicted beyond the capacity that the node's ephemeral storage can afford.  

This is causing the runner pods to be killed repeatedly, even though the build process itself is normal, causing it to fail.  
So, stdout logs / artifacts should be sent to external storage separately or something else.

How can I handle it?


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

Welcome to the community!

Can you please raise a support ticket in our [Support portal](https://support.atlassian.com/contact/) with the runner logs and pods so we can ivnestigate the issue further?

Regards,  
Syahrul


Tags: bitbucket-cloud

bitbucket-pipelines

bitbucket-runners

cloud
Bitbucket build stuck in progress
Asked by Narenthirakumar Thillaiananthan:

By mistaken, I have approved and merged the code to next branch before pr build completes. Due to this, build is in progress for long. Now, in bitbucket, that build is still going on and on and showing in progress. Due to which I am not able to merge my other changes to the branch because on each new PR raised the bitbucket is picking the same failed build and expecting to be successful

Anyhelp would be much appreciated!


Answers:
author: Patrik S
body: Hello [@Narenthirakumar Thillaiananthan](/t5/user/viewprofilepage/user-id/5521801) ,

and welcome to the Community!

You can manually stop a running build by accessing it in the UI and clicking on the **Stop** button:

![Screenshot 2024-06-18 at 6.20.52?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/330478i10F0CC3402C3E516/image-dimensions/226x163?v=v2 "Screenshot 2024-06-18 at 6.20.52?PM.png")

Could you confirm if you are not seeing that option?

Also, a step will, by default, timeout after 2 hours of execution, making it stop the execution with a failed status.

Let us know in case you have any questions.

Thank you, [@Narenthirakumar Thillaiananthan](/t5/user/viewprofilepage/user-id/5521801) !

Patrik S


Tags: bitbucket-cloud

bitbucket-pipelines

build

cloud

pull-request

stuck
A New user access is unable to access Bitbucket
Asked by Waseem Sajjad:

I have a new user joined our team. I invited him to jira and bitbucket. He has successfully accessed Jira by the invitation but for bitbucket when i added him he is receiving message that user has been blocked contact your administrator. I have cancelled his invite for Bitbucked and invited him again several times but issues remains the same. Anyone can help?


Answers:
author: Nicolas Grossi
body: [@Waseem Sajjad](/t5/user/viewprofilepage/user-id/5521254)

You were right to contact support after the research you have made.

Nicolas


author: Nicolas Grossi
body: [@Waseem Sajjad](/t5/user/viewprofilepage/user-id/5521254) Welcome, Could you please check the following link: <https://community.atlassian.com/t5/Bitbucket-questions/A-New-user-access-is-unable-to-access-Bitbucket/qaq-p/1843875> ?

Nicolas

comments: author: Waseem Sajjad
body: I have already checked and follwed the steps. Isuue is i have added a new user to jira, his jira is working fine. When we add him on bitbucket he receives the invite but when tries to sign in he gets the message that you do not have access to bitbucket and your account is blocked. I have removed the invite and send it over again but same issue


author: Waseem Sajjad
body: We have generated the tickect to support team also and ticket no is <https://support.atlassian.com/requests/BBS-219060>


author: Waseem Sajjad
body: I think the issue is that the user tried to excess the bitbucket without waiting for the invitation for bitbucket that's why his email is blocked from the server, so need to unblock him from the server and then may be it will work fine so can you help in that or only support team will do the needful?


Tags: bitbucket-cloud

cloud
Resetear password en bitbucket
Asked by GLMA:

Hola a todos, olvide mi password del bitbucket, como puedo resetearla o recuperarla??

su ayuda por favor.

Gracias


Answers:
author: Nicolas Grossi
body: [@GLMA](/t5/user/viewprofilepage/user-id/5521186) Welcome! Could you please check this link: <https://community.atlassian.com/t5/Bitbucket-questions/How-to-change-bitbucket-password/qaq-p/655536> ?

Nicolas


Tags: bitbucket-cloud

cloud
Bitbucket syncronization skipping submodules
Asked by Ian Dorion:

Greetings.  

I have notice the following. When a PR is behind the destination branch, Bitbucket offers the option to sync the featured branch. When used, it brings the featured branch up to date with destination branch.  

However, it is not updating the submodules. The only way to get a real sync that include submodules, is to merge the destination branch into the featured branch.  

<br />

Is this something that was overlooked or not implemented?  
Will different merge technique allows for the submodules to be updated as well?  

We currently use the squash technique when merging but the synchronisation is not updating the submodules.  

Anyone have a solution for this?


Answers:
author: Patrik S
body: Hello [@Ian Dorion](/t5/user/viewprofilepage/user-id/5505294) ,

thank you for reaching out to the Community!

The parent repository and the submodule repository are different repos, and they are not automatically kept in sync. This means that the parent repository will always explicitly point to a specific commit in the submodule.

If you push new commits to the submodule, it will not automatically update the parent repository with the new version. You will need to make a new commit in the parent repository to "update" the pointer to this new commit on the submodule repository.

The sync operation in the UI essentially merges the destination branch of the pull request into the source branch so that the source branch is up to date with the new changes introduced in the destination branch after the source branch was branched off.

If a new commit was pushed to the destination branch updating the pointer of a submodule to a different commit, the Sync operation in a pull request targeting that branch will also contain that update. You can confirm that after clicking on the **Sync** option and checking the merge commit that was created. It should look similar to the below :

![Screenshot 2024-06-18 at 5.32.58?PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/330471iE0506BCDDD40D25C/image-dimensions/430x240?v=v2 "Screenshot 2024-06-18 at 5.32.58?PM.png")

This is the merge commit automatically created by the ***Sync*** button. As you can see, it includes the updated pointer to the submodule that was previously pushed in a ++new commit++ to the destination branch.

Could you confirm if you are getting a different behavior? If yes, could you share the exact steps you are taking to get to that state?

Let us know in case you have any questions.

Thank you, [@Ian Dorion](/t5/user/viewprofilepage/user-id/5505294) !

Patrik S

comments: author: Ian Dorion
body: Thank You [@Patrik S](/t5/user/viewprofilepage/user-id/4603309)   

So I guess it's comes down to how the devs manage their PR. The update on the submodules with and old commit must come as a change made on the devs side.  

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />


author: Nicolas Grossi
body: [@Ian Dorion](/t5/user/viewprofilepage/user-id/5505294) Ha ve you reached support regarding this question ?

Nicolas


Tags: bitbucket-cloud

cloud

submodule

sync
Running cwltool in bitbucket pipelines leads to --mounts is not allowed
Asked by tristan_vanneste:

I'm trying to implement tests for my cwl code in bitbucket pipelines. Therefore I need to run the cwl code using:

```
cwltool main.cwl inputs.yml
```

Although this works locally, if you run this in the bitbucket pipeline you get the following error:

```
docker: Error response from daemon: authorization denied by plugin pipelines: --mounts is not allowed.

```

I know cwltool uses the docker --mount option but I cannot find an alternative. Is there a way to fix this on the side of Bitbucket pipelines?


Answers:
author: Tobias Wohlfrom
body: I had a similar problem. At least if you use a [self hosted runner](https://support.atlassian.com/bitbucket-cloud/docs/set-up-and-use-runners-for-linux/) you can enable the *--mount* option by switching to a [custom Docker image](https://support.atlassian.com/bitbucket-cloud/docs/databases-and-service-containers/#Define-a-Docker-service-with-a-custom-name) like

```
definitions:
??services:
????docker-custom:
??????type: docker
??????image: docker:27.1.2-dind-alpine3.20
??????memory: 8192
custom:
??test:
????- step:
????????name: Example
????????image: atlassian/default-image:4
????????runs-on:
?????????? - self.hosted
?????????? - linux
????????script:
?????????? - WORKFLOW_TMP=$BITBUCKET_CLONE_DIR/tmp
?????????? - mkdir $WORKFLOW_TMP
?????????? - export DEBIAN_FRONTEND=noninteractive
?????????? - export TZ=Europe/Berlin
?????????? - apt-get update
?????????? - apt-get install -y cwltool
?????????? - >-
???????????? cwltool
???????????? --tmpdir-prefix $WORKFLOW_TMP/
???????????? --tmp-outdir-prefix $WORKFLOW_TMP/
???????????? your-workflow.cwl
???????????? your-parameters.yml
??????services:
????????- docker-custom
```


author: Ben
body: Hi Tristan,

Unfortunately, there is no way to enable the docker mount option as this is disabled for security reasons. There are no plans to make this possible in Pipelines - you can see the rejection from our developers for this as a feature in the ticket below:

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

We do have an open [feature request](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html) to allow this in Pipelines Runners, but we do not have an ETA as to whether it will be accepted/implemented. You may follow this by **Watching** it and **Vote**for it to improve its visibility with regard to customer demand:

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

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud