youngmon/atlassian-qna huggingface dataset:
Can you "OR" triggers on Butler rules?
Asked by Brittany Joiner:

I'm trying to make a trigger that says "when this label is added" OR "when this label is added", and I thought i'd seen a way to do that before but I'm not seeing it now. Anyone have any ideas, or know if this is even possible?


Answers:
author: Michael Pryor
body: I think you just have to make two rules.

comments: author: Brittany Joiner
body: [@Michael Pryor](/t5/user/viewprofilepage/user-id/1131556) that's what i thought might be the case. Thanks for confirming!


author: milynnus
body: [@Brittany Joiner](/t5/user/viewprofilepage/user-id/1692248)

You got my reply on regex. Use that.

comments: author: Brittany Joiner
body: [@milynnus](/t5/user/viewprofilepage/user-id/3947182) but how can you apply that to labels? There's no way to add regex for labels, i just see it for content.

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/183884i2289633E0D9B3A0A/image-dimensions/331x190?v=v2 "image.png")


author: Brittany Joiner
body: For anyone else who ends up here, this is post with the reply on regex [@milynnus](/t5/user/viewprofilepage/user-id/3947182) is referring to :

<https://community.atlassian.com/t5/Trello-questions/Is-there-a-way-to-OR-items-in-a-quot-card-name-contains-quot/qaq-p/1927190>


author: milynnus
body: [@Brittany Joiner](/t5/user/viewprofilepage/user-id/1692248)

Use {labelname} to create a card and set another trigger with the regex and automate as required.   
<https://youtu.be/tZ4zySw6cSk>


author: Brittany Joiner
body: [@milynnus](/t5/user/viewprofilepage/user-id/3947182) maybe im just stupid today ? but i still don't understand how that works - a rule for when any label is added to a card, create a new card with {labelname}, and then find card with that {labelname} and do the action? wouldn't it do that to the newly created card with the labelname and not the card that the labelname came from?

I guess i could create a rule that when a label is added it adds a comment with the label name, and then i can add another trigger to use regex look for a comment with content A \| B \| C, and then do the action. That feels more convoluted than i was hoping for though and might just be easier to duplicate the rule and swap out the label.

Thanks for the feedback!


author: milynnus
body: [@Brittany Joiner](/t5/user/viewprofilepage/user-id/1692248)

Since it is a triggercard, I added {triggercardlink} to description when I created the new card. In the trigger from the new card do a find with {triggercarddescription} add any comment to the card where you first added the label.
How to install the 'Unity Cloud Build' app in Marketplace?
Asked by ???:

Hi, I am working on building a CI/CD pipeline.

I want to display Unity Cloud Build results in Bitbucket.   
I know that I need to install the app at Marketplace in Bitbucket for this.

But it has a problem.

The 'Unity Cloud Build' app doesn't install....  
I think that the URL connected install path is wrong. Is it changed?? If so, Could you please tell me the changed URL path?

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


Answers:
author: Jeroen De Raedt
body: Hi [@???](/t5/user/viewprofilepage/user-id/4174748),

you are right that the app was broken. We reached out to the app builder, but apparently it is no longer maintained. We have thus removed it from the marketplace.


Tags: bitbucket-cloud

cloud
What is the maximum repository size allowed in bitbucket cloud?
Asked by Trapthy:

We have a repo of size 100.1 GB, can a repo of this size be stored in bitbucket cloud?


Answers:
author: Walter Buggenhout
body: Hi [@Trapthy](/t5/user/viewprofilepage/user-id/4181039),

![Screenshot 2020-12-03 at 13.39.26.png](https://community.atlassian.com/t5/image/serverpage/image-id/120653i64637DF3F89E7E46/image-dimensions/590x180?v=v2 "Screenshot 2020-12-03 at 13.39.26.png") For more details, see also [this KB article on reducing repository size](https://support.atlassian.com/bitbucket-cloud/docs/reduce-repository-size/)

comments: author: Tyler T
body: I'm going to include that text here so it is more accessible:
> Bitbucket is great for keeping your source files and managing changes, especially when working on a team, but it's not the best place to keep large binary files, such as executables and other build artifacts, or videos and other media files.
>
> We recommend repositories be kept under 1.0 GB to help ensure that our servers are fast and downloads are quick for our users. Bitbucket Cloud repositories have a 2.0 GB limit. When that limit is reached, you will only be able to push changes that undo the latest commits. There is also a hard limit of 5.0 GB. When that limit is reached, you will not be able to push any changes, and your repository becomes read-only.


Tags: bitbucket-cloud

cloud

repository

size
402 Error - When I push the code
Asked by pms-ramanuja:

Hi,

My Plan is "Standard" - I have 6 users in my Project.

When I push the code, I am getting 402 Error - It also says "Maximum limit exceeds" but I have changed my plan.

How do I resolve my issue?


Answers:
author: pms-ramanuja
body: Hi [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086) ,

I am able to push the code now. Thanks.


author: Theodora Boudale
body: Hi [@pms-ramanuja](/t5/user/viewprofilepage/user-id/4182166) ,

I believe it may have taken some time for the plan change to propagate through our systems.

I'm not sure if the issue is still occurring today for you, but I went ahead and manually forced a sync between Bitbucket and our billing system for your workspace, just in case.

Could you please let me know if things are ok from you side now?

Kind regards,  
Theodora

comments: author: pms-ramanuja
body: Hi [@Theodora Boudale](https://community.atlassian.com/t5/user/viewprofilepage/user-id/818086) ,

I am able to push the code now. Thanks.


Tags: bitbucket-cloud

cloud
Any methods to specify pipeline build orders between 5 repos?
Asked by Horace Cheung:

Hello,

Back in Jenkins, I can specify easily if job 1 (i.e. for repo R1) is completed, then auto run job 2 (for repo R2) \& 3 (for repo R3) immediately. Is there anyway to specify this pipeline build orders in bitbucket pipeline? How does everyone solve this build orchestration ordering issue?

Thanks \& Best Regards,

Horace


Answers:
author: Theodora Boudale
body: Hi Horace,

I see that you opened a support ticket for this issue as well and got assistance there.

I just wanted to leave a reply here for any others users which may come across your question. It is possible to trigger a Pipelines build for a different repo with the following pipe:

* <https://bitbucket.org/product/features/pipelines/integrations?p=atlassian/trigger-pipeline>

In this case, you add in the bitbucket-pipelines.yml file of repo R1 a command with a pipe to trigger a build in repo R2, and another one to trigger a build in repo R3.

If you need anything further, please feel free to reach out!

Kind regards,  
Theodora


Tags: bitbucket-pipelines
Bitbucket app password rotation
Asked by asaushkin:

I want to use a private bitbucket repository as a source for AWS Sagemaker service.

I've already checked this and It is working great. But the security team wants to implement a periodical rotation of the password (Bitbucket app password).

I wonder if it is possible to create a new app password through Bitbucket API using the old app password? Is it possible to do that through Python API?

I found a couple of repositories for working with Bitbucket and I don't know can they allow me to achieve my goal...

<https://github.com/atlassian-api/atlassian-python-api>

<https://bitbucket.org/atlassian/python-bitbucket>

Any ideas?


Answers:
author: Joao Sgreccia
body: [@asaushkin](/t5/user/viewprofilepage/user-id/4181721) ,  

Unfortunately, [Bibucket Cloud API](https://developer.atlassian.com/bitbucket/api/2/reference/resource/) does not provide a public API for changing/generating app passwords.  

<br />

Cheers

comments: author: asaushkin
body: Thanks, Joao!


author: Josh Beauregard
body: may I ask why,?

is this on the road map?


author: Joao Sgreccia
body: Hi [@Josh Beauregard](/t5/user/viewprofilepage/user-id/4199121)  

I don't know why it was never prioritized.  
I would strongly recommend opening a request ticket at <https://jira.atlassian.com/browse/BCLOUD> in that way it increases the chances to be prioritized.  

Cheers  


author: Mattias ?sell
body: [@Josh Beauregard](/t5/user/viewprofilepage/user-id/4199121) Did you end up opening a ticket?


Tags: api

app

authentication

bitbucket-cloud

cloud

python
XSRF token error with Data Center evaluation
Asked by Chris Warren:

<https://confluence.atlassian.com/bitbucketserverkb/xsrf-security-token-missing-779171343.html> describes my problem pretty well, but none of the solutions are working.

This is a three-node Bitbucket Data Center system, behind a Netscaler load balancer, and the BITBUCKETSESSIONID cookie is getting set -- that I can see with the browser's tools.

Lines like this appear in the atlassian-bitbucket.log files:

2020-12-02 11:53:10,497 WARN \[http-nio-7990-exec-1\] admin @BL40E5x713x8x3 1d7b6ia 10.82.0.10 "POST /rest/analytics/1.0/publish/bulk HTTP/1.1" c.a.p.r.c.s.j.XsrfResourceFilter Additional XSRF checks failed for request: <http://cigfsgit.runwaynine.com:443/rest/analytics/1.0/publish/bulk> , origin: <https://cigfsgit.runwaynine.com> , referrer: <https://cigfsgit.runwaynine.com/admin> , credentials in request: true , allowed via CORS: false

The load balancer is redirecting HTTP requests to HTTPS, the secure attribute isn't set in bitbucket.properties, and this is a new installation, so there's no "jvmRoute" set.


Answers:
author: Christian Glockner
body: Hi Chris,

I'm seeing

**http** ://cigfsgit.runwaynine.com:**443**/rest/analytics/1.0/publish/bulk

that looks like a typo to me - check both the Base URL you configured in the Bitbucket Server admin UI, as well as your settings for **server.scheme** in bitbucket.properties, which should be set to **https** , and **server.secure** needs to be set to **true**.

Cheers,

Christian

Premier Support Engineer

Atlassian

comments: author: Chris Warren
body: Yes, the base URL is configured wrong (http instead of https), but I cannot change it, because trying to submit the form to change it causes the XSRF error to happen.


Tags: bitbucket-server

data-center

load-balancer

server
How to get list of files for a PR in Bitbucket?
Asked by Gillian Wedick:

How can I get a list of files associated with a PR in bitbucket?

I can't find the join between the sta_pull_request table and the file

Thanks


Answers:
author: Ang?lica Luz
body: Hello [@Gillian Wedick](/t5/user/viewprofilepage/user-id/2509121),

Thank you for reaching out to Atlassian Community!

I know it has been a while since you posted this question and I would like to share with you some information that may help you. I'm not a Bitbucket specialist, but I searched on some internal tickets and found this:

* [Making a Pull Request](https://www.atlassian.com/git/tutorials/making-a-pull-request)
* [Git LFS](https://www.atlassian.com/git/tutorials/git-lfs)
* [How to join issues and pull requests in select?](https://community.atlassian.com/t5/Bitbucket-questions/How-to-join-issues-and-pull-requests-in-select/qaq-p/831317)

If you already resolved this issue, feel free to share it here to help other community members that may have the same question.

Hope this helps!

Kind regards,  
Ang?lica


Tags: bitbucket-server

jira-software
Pipelines: git push gives warning: Your account does not have an email address associated with it
Asked by ob:

We use Bitbucket Pipelines.

We have some release process defined in Pipelines. In this step we create a new git tag and do finally a "git push origin \<my-tag-name\>".

It works so far, but in the Pipelines console log I see the following Warning message:

    remote: Your account does not have an email address associated with it
    remote: Please set one by visiting ....

How can I get rid of this message? Or what's the issue producing this warning?

Thanks for help!


Answers:
author: AJMaxwell
body: Any updates on this? I am having a similar issue.


author: ??????? ???????????
body: I have the same problem when I work with a repository that is in my workspace

comments: author: marcomasi
body: Same for me. Any solution?


author: Pavel Shurikov
body: I get the same warning while using OAuth consumer. In my case it's likely being caused by not having an actual Bitbucket user associated with the email that I set with git config before I can write to the repo.  
This might be helped by having dedicated bot users, so please vote on this request: <https://jira.atlassian.com/browse/BCLOUD-11739>.  
Alternatively, can have emails associated with OAuth consumers.


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
Hi, is there a way to import multiple projects from gitlab to bitbucket cloud in an automated way?
Asked by Trapthy:

We are trying to migrate numerous projects from gitlab to bitbucket cloud, any insight on this will help, APIs that could be used, etc.


Answers:
author: seanaty
body: There is another thread on this topic here: <https://community.atlassian.com/t5/Bitbucket-questions/Migrate-from-Gitlab-to-Bitbucket-Cloud/qaq-p/1511240>


Tags: bitbucket-cloud
aws-lambda-deploy pipe how to fix aws-lambda-deploy-env: Permission denied
Asked by Oli Pursaill:

As part of running the pipe below

```
- pipe: atlassian/aws-lambda-deploy:0.5.7
  variables:
    AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
    AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
    AWS_DEFAULT_REGION: 'eu-west-2'
    FUNCTION_NAME: 'MyFunction'
    COMMAND: 'update'
    ZIP_FILE: 'code.zip'
```

The script update-lambda.sh writes to /opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/aws-lambda-deploy-env. That file is then read by pipe.sh in a subsequent pipe when you run with the alias command. e.g.

```
COMMAND: 'alias'
```

However if I have another pipe in my bitbucket-pipelines.yml file before the aws-lambda-deploy pipe. e.g.

```
sonarsource/sonarcloud-scan:1.2.1
```

then update-lamda.sh cannot write the aws-lambda-deploy-env file as it gets a permission denied error.

Shouldn't the aws-lambda-deploy-env file be created in /opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/atlassian/aws-lambda-deploy ?

And why does the creation of the /opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/ by another pipe stop it being available for the subsequent pipe?


Answers:
author: Oli Pursaill
body: The solution was to delete the shared directory before running the aws-lambda-deploy pipe.

```
... previous steps call the sonarsource/sonarcloud-scan pipe ...
- step: 
    name: 'Deploy Lambda to AWS' 
    script: 
      # Writing the $BITBUCKET_PIPE_SHARED_STORAGE_DIR/aws-lambda-deploy-env file causes a permissions denied failure, so we first delete the directory
      - rm -rf  /opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes
      - pipe: atlassian/aws-lambda-deploy:0.5.7 
        variables: 
           AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID} 
           AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY} 
           AWS_DEFAULT_REGION: 'eu-west-2' 
           FUNCTION_NAME: 'MyFunction' 
           COMMAND: 'update' 
           ZIP_FILE: 'code.zip'
?
```

Still don't know why running the sonar pipe first prevents the aws pipe from writing to the shared storage location

comments: author: Tutux
body: It worked fine for me!


author: Jim Reynolds
body: Just had this issue come up myself specifically with sonarcloud-scan where we have multiple pipes deploying to different environments.

The first deployment is fine but the second fails as it cannot write to  
/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/sonarsource/sonarcloud-scan/sonarcloud-scan.log: Permission denied

This solution was as above.


author: Malte H?bner
body: Also see duplicate: <https://community.atlassian.com/t5/Bitbucket-Pipelines-questions/Permission-denied-on-atlassian-aws-lambda-deploy/qaq-p/1205757>


Tags: aws

bitbucket-pipelines

cloud

lambda
Bitbucket repository doubled in size?
Asked by Rik Overvelde:

Hello,

I'm working with a rather big repository that was converted from SVN. After cleaning some old binaries from history we've luckily got the size down to just over 930 MB (according to 'git count-objects').

Yesterday however, we started getting warnings that the size of the repository was nearing it's limits at a size of 1.86GB. So it seems that it suddenly doubled in size on the server.

Is it possible to run a GC on the repositories linked to my account to see if this solves it?


Answers:
author: Theodora Boudale
body: Hi Rik,

Of course, I found 2 repositories with a size around 1.8 GB from the ones you have access to.

I ran a git gc on the one that is not marked as '_backup' and its size went down to 944.7 MB.

Would you like me to run a git gc on the one marked as '_backup' as well?

Kind regards,  
Theodora

comments: author: Rik Overvelde
body: Thanks for the help! No GC has to be executed on the backup repository; that's a backup we made before removing old binary files from the main repository. We'll probably remove that one soon.


Tags: bitbucket-cloud

cloud
How do we get notified of IP changes
Asked by Andrew Nicholls:

When bitbucket.org added additional IPs to its DNS range it broke our deployment tooling as the deployment servers are located behind outbound allow rules based on IP address.

<https://bitbucket.org/blog/speeding-up-bitbucket-cloud-with-aws-global-accelerator-and-adding-some-new-ip-ranges>

Apart from "following" them on twitter or facebook, or manually checking the blog posts, is there a way to be notified of these changes in advance?


Answers:
author: Nic Brough -Adaptavist-
body: No, I'm afraid you just have to follow the general Bitbucket blog as mentioned on <https://support.atlassian.com/bitbucket-cloud/docs/what-are-the-bitbucket-cloud-ip-addresses-i-should-use-to-configure-my-corporate-firewall/>

comments: author: Andrew Nicholls
body: Thanks Nic.

But when you say "follow" is there a way to get notified of new blog posts on a specific topic? Or do we just have to remember to check in periodically?


author: Nic Brough -Adaptavist-
body: For blogs, I'm afraid it's checking in regularly. Atlassian have some mailing lists and RSS feeds dotted around too, but I'm not sure any of them report on new blogs.

<https://developer.atlassian.com/platform/marketplace/early-access-program/> may be of some use


author: Andrew Nicholls
body: Yes was looking for an RSS feed. They seemed to have dropped out of fashion.

Thanks for the response.


Tags: bitbucket-cloud

cloud
Bitbucket search log is massive
Asked by networksystems.dhs@tn.gov:

Bitbucket search log is massive as 50 gb. It is crashing Bitbucket application and user cannot access the application. Is there way to shrink the size or make the log not to be that huge?

Thanks


Answers:
author: Christian Glockner
body: Hi,

You can simply delete the file, or if you're running Linux, just run

echo 0\>bitbucket-search.log

which will empty the file.

Cheers,

Christian

Premier Support Engineer

Atlassian

comments: author: Alex Hodge
body: What's the way to configure this file so that similar outages can be avoided? i.e. a log file size rotate trigger.

I'm unable to find a setting in atlassian/application-data/bitbucket/shared/search/log42j.properties that achieves this. I have tried amending to get a SizeBasedTriggeringPolicy:

*** ** * ** ***

appender.rolling.type = RollingFile  
appender.rolling.name = rolling  
appender.rolling.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}.log  
appender.rolling.layout.type = PatternLayout  
appender.rolling.layout.pattern = \[%d{ISO8601}\]\[%-5p\]\[%-25c{1.}\] \[%node_name\]%marker%.-10000m%n  
appender.rolling.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}-%d{yyyy-MM-dd}.log  
appender.rolling.policies.type = Policies  
appender.rolling.policies.time.type = TimeBasedTriggeringPolicy  
appender.rolling.policies.time.interval = 1  
appender.rolling.policies.time.modulate = true  
**appender.rolling.policies.size.type = SizeBasedTriggeringPolicy**   
**appender.rolling.policies.size.size = 1GB**

*** ** * ** ***

This doesn't seem to have an impact as it's for the rotated files, and not the base one.


Tags: bitbucket-server

server
Using Bitbucket Pipelines to Sync Git Repos with Password-based Access
Asked by Tad Reeves:

Is there a way to use Bitbucket Pipes to sync a Bitbucket repo with an external git repo that only allows authentication with userid/password? I can only find examples of doing this with key-based authentication.

Presently Adobe Experience Cloud solutions host code in a git repo that they control, which only allows userid/password auth and not key-based auth.


Answers:
author: Theodora Boudale
body: Hi [@Tad Reeves](/t5/user/viewprofilepage/user-id/4180183) and welcome the community.

You can do this the following way:

**1.** Create variables for the username and password, either as repository variables (from the **Repository settings** page \> **Repository variables** ) or as workspace variables (from workspace **Settings** \> **Workspace variables**), if you need those in more than one repo.

Make sure that you select the checkbox **Secured** when you create the variable for the password, so that it's not visible to anyone.

**2.** In your bitbucket-pipelines.yml file, you can include in the script a command that pushes to the repo:

```
git push https://${username}:${password}@hosting-provider/repo-owner/repo-name.git
```

assuming that the variables were named username and password

Replace also the values for hosting-provider/repo-owner/repo-name with the appropriate ones for your repo.

The Docker image that you use for the step that does the push should have git installed already for this to work.

Is this something that works for you? Please feel free to let me know if you have any questions.

Kind regards,  
Theodora


Tags: bitbucket-pipelines