youngmon/atlassian-qna huggingface dataset:
How to use Butler to remove a PDF attachment
Asked by nvindice:

Hi, we feed our Trello board with auto-generated Mails which have PDF attachments. I would like to remove all of these attachments first thing when a card enters the board. How is this possible?

Thanks in advance!  
Nils


Answers:
author: milynnus
body: [@nvindice](/t5/user/viewprofilepage/user-id/4918159)

There is single action to add/remove attachment via link but I cannot find a way to iterate through all the attachments and looking for pdf specifically and removing the attachment. It can definitely be done via http request using trello api.

comments: author: nvindice
body: Thanks, is there a way to remove a specific PDF with the "remove link" action? I do know the filenames, but it does not seem to work this way.


author: milynnus
body: [@nvindice](/t5/user/viewprofilepage/user-id/4918159)

I am not at my desk but I think the url has the attachment id in the path besides the name.


author: nvindice
body: [@milynnus](/t5/user/viewprofilepage/user-id/3947182) Yes, there is one. I was hoping I could remove the attachment just by it's filename, but this does not seem to work.

However, I can't find a way to build deleting the PDF attachments using the Trello API with only a single http request, too. So there does not seem to be a way to solve my problem with Trello+Butler only, right?


author: milynnus
body: [@nvindice](/t5/user/viewprofilepage/user-id/4918159)

The http request can call an endpoint that has ability to go through all the attachments to find the name match if that is what is required.   
here are some examples

<https://github.com/xu2xulim/Superhero/blob/master/Superhero%20on%20deta/Micros/Attachments.md>


author: nvindice
body: [@milynnus](/t5/user/viewprofilepage/user-id/3947182)Thanks, but this is a third party service, right? As the information on the cards is quite sensitive, we would like to use Trello and Trello services like Butler only (as stated in the initial request). Or am I missing something?


author: milynnus
body: *** ** * ** ***

[@nvindice](/t5/user/viewprofilepage/user-id/4918159)

It is something I developed but you can always have one built just for your use. If there is a Butler solution, yes you should go for it.


author: nvindice
body: [@milynnus](/t5/user/viewprofilepage/user-id/3947182)We work under German GDPR/DSGVO with a mandatory DPA. I guess our problem is not large enough to justify the effort here.

However, I was expecting this simple feature ("remove all attachments" oder "remove attachment with name") to be a part of standard Butler features.

Thanks for your help!


author: milynnus
body: [@nvindice](/t5/user/viewprofilepage/user-id/4918159)

I am not familiar with German regulations but as far as I know there is none. Trello provides the http request within Butler for you to call services to handle such unique requirements. So you can get you in-house developers to create a service for you.


Tags: butler
How to Create Formatted Issues in Bitbucket
Asked by API test:

I'm using PHP to automatically create Issues in Bitbucket, but the formatting of the issues is not working. This JSON to create issues:

{"title":"$titulo","content":{"raw":" $titulo n \*\*name:\*\* $name \*\*Test:\*\* $test n \*\*Location:\*\* $location \*\*pobox:\*\* $pobox "}}

<br />

How can I do to format my issues?

<br />

For example: to make bold, italics and skip lines in the issues' texts.

I need help, please.

Thanks very much,


Answers:
author: API test
body: Does anyone know how I can create bold, italic text and skip lines?


Tags: bitbucket-cloud

cloud

format

issue
ERROR: Command errored out with exit status 128
Asked by Pantelis Kaniouras:

Good evening people,

I am trying to run pip install -r requirements.txt and through that clone some code from a bitbucket repo. When I do that I get the following error:

```

(my_env) C:\Users\...\tool>pip install -r requirements.txt
Collecting git+ssh://****@bitbucket.org/.../...git@4.19.0#subdirectory=py (from -r requirements.txt (line 8))
Cloning ssh://****@bitbucket.org/.../...git (to revision 4.19.0) to c:\users\...\appdata\local\temp\pip-req-build-t9_wrhxh
ERROR: Command errored out with exit status 128: git clone -q 'ssh://****@bitbucket.org/.../...git' 'C:\Users\...\AppData\Local\Temp\pip-req-build-t9_wrhxh' Check the logs for full command output.
```

The requirements.txt file contains the following text:

```
git+ssh://git@bitbucket.org/.../...git@4.19.0#subdirectory=py?
git+ssh://git@bitbucket.org/.../...git@c99b7f6f372c92832eecfb90663833ef1fd3dc62
git+ssh://git@bitbucket.org/.../...git@45d2999ce5f6eba5dd728414073a10d1c50616a2
git+ssh://git@bitbucket.org/.../....git@1ba2781cd2beae6d23218565c395b633b0eb5328
#pytest==4.4.0.
```


Answers:
author: Pantelis Kaniouras
body: Solved: the requirements.txt file moves forward before requesting the passphrase from the user and therefore, cannot clone.


Tags: git
sourcetree and clone
Asked by Martin Str?m:

Hello,

in SourceTree I can see all repositorys in the client so i belive Auth is working.

But when trying to Clone a repo. i get the following error:

i use Google as authendication.

Error:

*Command: git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks ls-remote https://USERNAME@bitbucket.org/USERNAME/misc.git*   
*Output:*   
*Error: remote: Too many invalid password attempts. Log in at <https://id.atlassian.com/> to restore access.*   
*fatal: unable to access '<https://bitbucket.org/USERNAME/misc.git/>': The requested URL returned error: 403*


Answers:
author: Martin Str?m
body: Doh forgot to install Git.... now it works.


author: Martin Str?m
body: in a browser if i go to <https://bitbucket.org/USERNAME/misc.git/> it redirects me to <https://bitbucket.org/USERNAME/misc/src/master/> so that part works aswell....


Tags: bitbucket-cloud

cloud

sourcetree
Accessing a site build in Pipelines
Asked by bsuttis:

I'm using Pipelines to install a Drupal site and run Behat tests prior to deployment to its hosting environment.

The install is successful however I cannot figure out how to access the build in order to run the tests against it. Behat configuration calls for a \`base_url\` to test against.

I could set \`base_url\` to the production instance but any test involving a user account would fail since the user account is being created in the Pipeline's build and not the production instance.

I tried using 127.0.0.1 as the \`base_url\` but it failed: *cURL error 7: Failed to connect to 127.0.0.1 port 80: Connection refused*

I also tried adding the following to my pipeline step's script and updating behat.yml's \`base_url\` to <http://cmds.ci> but it also failed (*cURL error 7: Failed to connect to [cmds.ci](http://cmds.ci/) port 80: Connection refused*):

```
step:
  script:
    - echo "127.0.0.1 cmds.ci" >> /etc/hosts
    - ..
```

Is it possible to access the build?


Answers:
author: Justin Thomas
body: [@bsuttis](/t5/user/viewprofilepage/user-id/4328100) You should be able to access your webserver at 127.0.0.1. Are you starting the webserver in the step or as a [service](https://support.atlassian.com/bitbucket-cloud/docs/databases-and-service-containers/)?

comments: author: bsuttis
body: [@Justin Thomas](/t5/user/viewprofilepage/user-id/777223) I'm using docksal/web:2.1-apache2.4 as the 'web' service and \`wget <http://127.0.0.1>\` works.

Where I'm confused is: I have a file called foo.html in my repository and attempting \`wget <http://127.0.0.1/foo.html>\` fails with a 404. I'm assuming the top directory of my repo works like docroot but it's not.


author: Justin Thomas
body: Is \`docksal/web\` started as a [service](https://support.atlassian.com/bitbucket-cloud/docs/databases-and-service-containers/) or do you use docksal/web as the base image for the step?


author: bsuttis
body: [@Justin Thomas](/t5/user/viewprofilepage/user-id/777223) it's started as a service.


author: Justin Thomas
body: I might be missing something but If you start docksal/web as a service it will not have access to your source code because the source code volume is not mounted to the service.


Tags: bitbucket-cloud

bitbucket-pipelines

build

cloud
rsync-deploy or rsync-ssh?
Asked by robtown:

Site ground has recently updated our hosting tools from cPanel to their suite of "Site Tools" now my existing rsync-ssh pipelines are not working.

I have it pretty much sorted out all the way to my script where I run the rsync command.

It's not copying my changes over to my server. The files seem to be updated (based on datestamps in the file explorer on the actual site) but I don't see any of the expected code changes.

So while trying to troubleshoot this, I came across the rsync-deploy pipe.

I'm wondering if I'd have better luck with that one?


Answers:
author: Oleksandr Kyrdan
body: Hi [@robtown](/t5/user/viewprofilepage/user-id/1734403)

Thank you for your question!

According to the [rsync docs](http://manpages.ubuntu.com/manpages/trusty/en/man1/rsync.1.html) you could use one of parameters "--ignore-times", "--ignore-size" or "--checksum" related to your case as an EXTRA_ARGS option for the [rsync-deploy pipe:](https://bitbucket.org/atlassian/rsync-deploy)

```
script:  - pipe: atlassian/rsync-deploy:0.4.4    variables:      USER: 'ec2-user'      SERVER: '127.0.0.1'      REMOTE_PATH: '/var/www/build/'      LOCAL_PATH: 'build'      DEBUG: 'true'      EXTRA_ARGS: '--ignore-time' or '--ignore-size' or 'checksum' # one of parameters
```

<br />

Cheers,  
Oleksandr Kyrdan  


Tags: bitbucket-pipelines

cloud

rsync
Disable Jenkins multibranch pipeline trigger on every commit
Asked by chatzich:

I have a multibranch pipeline which is triggered after every commit, I want to disable every commit run and just set a trigger for a simple nightly test build


Answers:
author: Marie-H?l?ne Touchette
body: This is more about Jenkins than Bitbucket, really.

You could just remove the bitbucket webhook that's triggering jenkins, and enable daily repository polling in your multibranch pipeline configuration (Scan Multibranch Pipeline Triggers)


Tags: bitbucket-cloud

cloud

jenkins
End of life policy for bitbucket smart mirrors
Asked by Marcin:

Hi community maybe you can help me to clarify something.

Bitbucket Data Center has feature called Smart Mirror - which comes to "just" server installation and startup flag "mirror". Some time ago there was instruction that mirrors need to be version 4.2+ Also they don't need to be upgraded to align with DC nodes.

But such setup end up in a place where you can have 'n' mirrors in version 4.2+ and 7.11 on DC. How smart mirror version matched EOL? Versions older than 6.2 are not even listed on <https://confluence.atlassian.com/support/atlassian-support-end-of-life-policy-201851003.html>

Does mirror version matter? Or maybe only DC is important and mirrors can stay 4.2 for next years?

Thanks,

Marcin


Answers:
author: Christian Glockner
body: Hi Marcin,

Anything not listed at <https://confluence.atlassian.com/support/atlassian-support-end-of-life-policy-201851003.html> has already reached end-of-life status. EOL applies to all parts of the product including Smart Mirrors.

Note that it is only up to version 6.6 that you can have version-mismatched deployments of DC and Smart Mirrors - with 6.7 Mirror Farms were introduced which no longer allows for this.

Cheers,

Christian

Premier Support Engineer

Atlassian

comments: author: Marcin
body: Thanks [@Christian Glockner](/t5/user/viewprofilepage/user-id/527595) ! We're not using Mirror farms but even thou not having mirrors listed on above page we will not have support for them. Good clarification.


Tags: bitbucket-server

data-center

mirror

server

smart-mirror
Artifact doesn't upload during the build process
Asked by Carbajal:

Hi, I have this issue: basically the pipeline failed when the Deploy step is executed, because it can't find the dist folder. Meaning LOCAL_PATH can't find that directory.

In fact, you can see that in Artifacts tab is empty.

My root project is compose of:

- docker folder

- source folder -\> this one contains my Vue App. \[public, src, package.json, etc\]

- [bitbucket-pipelines.yml](https://bitbucket.org/ivent-product/vue2-app/src/master/bitbucket-pipelines.yml)

Could anyone please help me out to resolve the issue. Or please let me know where I am doing wrong. Thank you

![Screenshot 2021-03-30 at 11.12.58.png](https://community.atlassian.com/t5/image/serverpage/image-id/136546i6A1FC47C25F27892/image-size/large?v=v2&px=999 "Screenshot 2021-03-30 at 11.12.58.png")

![Screenshot 2021-03-30 at 11.07.04.png](https://community.atlassian.com/t5/image/serverpage/image-id/136542i8A381B7378825F8F/image-size/large?v=v2&px=999 "Screenshot 2021-03-30 at 11.07.04.png")

![Screenshot 2021-03-30 at 10.45.40.png](https://community.atlassian.com/t5/image/serverpage/image-id/136538i087EA23F8ABC1A63/image-size/large?v=v2&px=999 "Screenshot 2021-03-30 at 10.45.40.png")

![Screenshot 2021-03-30 at 10.46.46.png](https://community.atlassian.com/t5/image/serverpage/image-id/136537iE02A1E01D10BF5E8/image-size/large?v=v2&px=999 "Screenshot 2021-03-30 at 10.46.46.png")


Answers:
author: Theodora Boudale
body: Hi [@Carbajal](/t5/user/viewprofilepage/user-id/4327153) and welcome to the community.

Does the **dist** folder already exist in your repo, or is it generated during the build with the **npm run build** command?

I can see in the script of your first step that you first change directory to **source** and then run **npm install** and **npm run build**. So, if the folder is generated by the latter command, I believe it will be generated inside the source directory.

If this is the case, I believe you need to include that in the path for both artifacts and also the pipe:

So, in your bitbucket-pipelines.yml file, in the build step, you'll need to define:

```
artifacts:
? - source/dist/**
```

and in the second step, in the pipe definition:

```
LOCAL_PATH: 'source/dist'
```

Could you give this a try and let me know if it works for you?

Kind regards,  
Theodora

comments: author: Carbajal
body: Many thanks, It worked!


author: Theodora Boudale
body: That's good to hear, thank you for the update and you are very welcome!


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
Unable to send Webhook notification to Teams
Asked by Aditya Raj Verma:

Hi Team,

I am not able to configure webhook notification to teams.

Teams is looking for below format:

<https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/connectors-using#example-connector-message>

But you are sending notification in below format:

[https://confluence.atlassian.com/bitbucketserver076/event-payload-1026535078.html?utm_campaign=in-app-help\&utm_medium=in-app-help\&utm_source=stash#](https://confluence.atlassian.com/bitbucketserver076/event-payload-1026535078.html?utm_campaign=in-app-help&utm_medium=in-app-help&utm_source=stash#)

Please help me what i need to do as i am getiing 400 error


Answers:
author: Move Work Forward
body: Hi [@Aditya Raj Verma](/t5/user/viewprofilepage/user-id/4326736)

You need to use something that converts Bitbucket message to the Microsoft Teams one.

For instance, [Microsoft Teams Bitbucket Connector](https://marketplace.atlassian.com/apps/1216365/microsoft-teams-bitbucket-connector?hosting=cloud&tab=overview).

If you need any help please reach out - <https://www.moveworkforward.com/microsoft-teams/atlassian-integrations>

Regards,

Leo

comments: author: Aditya Raj Verma
body: Thanks Leo for quick reply.


Tags: bitbucket-cloud

cloud
Unable to push files
Asked by Maria Prudencio:

Hi,

I'm unable to push staged files. When attempting to do so while authenticated via HTTPS, I receive the following output:

![2021-03-29 12_35_18-ENCA-MPRUDENCIO-TMP - TeamViewer.png](/t5/image/serverpage/image-id/136488i429110D45DBA0128/image-size/large?v=v2&px=999 "2021-03-29 12_35_18-ENCA-MPRUDENCIO-TMP - TeamViewer.png")

However, the file remains unchanged and in the 'Uncommitted Changes' section.


Answers:
author: Theodora Boudale
body: Hi [@Maria Prudencio](/t5/user/viewprofilepage/user-id/4326286) ,

After you stage files, you need to commit them as well, in order to be able to push them to the remote repo.

When you make changes to these files, are you able to stage and create a new commit locally for these changes?

Kind regards,  
Theodora


Tags: cloud
Is there a way to get license information from the linux command line?
Asked by Kent Anderson:

I'm trying to get license information (serial #, version, # users, ...) from the linux command line. Is this possible?


Answers:
author: Kurt Klinner
body: [@Kent Anderson](/t5/user/viewprofilepage/user-id/3682684)

Hi Kent

have you already checked the REST APi

As a user with Admin permission you could use the

/rest/api/1.0/admin/license method described at

<https://docs.atlassian.com/bitbucket-server/rest/7.4.1/bitbucket-rest.html#idp46>

and get a result like

    {    "creationDate": 1331038800000,    "purchaseDate": 1331038800000,    "expiryDate": 1372493732817,    "numberOfDaysBeforeExpiry": 0,    "maintenanceExpiryDate": 1372493732817,    "numberOfDaysBeforeMaintenanceExpiry": 0,    "gracePeriodEndDate": 1372493732817,    "numberOfDaysBeforeGracePeriodExpiry": 0,    "maximumNumberOfUsers": 12,    "unlimitedNumberOfUsers": false,    "serverId": "<server ID embedded in license>",    "supportEntitlementNumber": "<support entitlement number embedded in license>",    "license": "<encoded license text>",    "status": {        "serverId": "<actual server ID>",        "currentNumberOfUsers": 2    }}

Cheers

Kurt


Tags: bitbucket-server

server
What's Wrong With My Token Generation.
Asked by Saikat Samanta:

What's wrong with my JWT generation I am using this code to generate JWT![Screenshot 2021-03-29 at 9.47.35 PM.png](/t5/image/serverpage/image-id/136467iBEFCEEF947C4D28A/image-size/large?v=v2&px=999 "Screenshot 2021-03-29 at 9.47.35 PM.png")

const jwt = require('atlassian-jwt');

const moment = require('moment');

const now = moment().utc();

const clientKey='XXXXXXXXXXXX';

const sharedSecret = 'XXXXXXXXXXXXXX';

const req = jwt.fromMethodAndUrl('GET', '<https://api.bitbucket.com/2.0/repositories/{bfd8fa1a-XXX-XXX-XXX-XXXXXXX>}');

const tokenData = {

"iss": 'codelock',

"iat": now.unix(),

"exp": now.add(30, 'minutes').unix(),

"qsh": jwt.createQueryStringHash(req),

"sub": clientKey

};

const token = jwt.encode(tokenData, sharedSecret);console.log(token);


Answers:
author: Dario B
body: Hello [@Saikat Samanta](/t5/user/viewprofilepage/user-id/4325771) ,

Welcome to the Atlassian Community!

I might not be the best person to answer development related questions, however, looking at your screenshot I can see that you are providing a wrong authorization header.

Indeed, in your screenshot I can see:

    Authorization: JWT <token>

While it is supposed to be:

    Authorization: Bearer <token>

Therefore, there are chances there is nothing wrong with the code to generate the JWT token and that the issue is just with the authorization header you are providing.

Can you kindly try to use the correct header and check if this works?

Finally, for the future, please notice that this is not the best place to get help on development related questions. The right resources are listed in [https://developer.atlassian.com/resources.](https://developer.atlassian.com/resources "https://developer.atlassian.com/resources")

Specifically:

* [Ask the Developers Community](https://community.developer.atlassian.com/ "https://community.developer.atlassian.com/")
* [Create a Developer Support Request](https://ecosystem.atlassian.net/servicedesk/customer/portal/14 "https://ecosystem.atlassian.net/servicedesk/customer/portal/14")

Cheers,  
Dario


Tags: app

atl-dev

bitbucket-cloud

cloud
How to upgrade serverless version on pipe atlassian/serverless-deploy:0.2.2
Asked by Vitor Oliveira:

How can I upgrade the serverless version on pipe atlassian/serverless-deploy:0.2.2?  
It is using 1.83.3 and I want to upgrade to 2.X version


Answers:
author: Oleksandr Kyrdan
body: Hi [@Vitor Oliveira](/t5/user/viewprofilepage/user-id/4319757)

A new version of the [serverless-deploy pipe released.](https://bitbucket.org/atlassian/serverless-deploy)

Big updates provided: updated the Serverless Framework to 2.\* version and NodeJS to 12 LTS version.

```
script:  - pipe: atlassian/serverless-deploy:1.0.0    variables:      AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID      AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
```

It would be nice if you provide us with your feedback about this update.  

Cheers,  
Oleksandr Kyrdan

comments: author: Vitor Oliveira
body: Thank you. It worked as expected


author: Oleksandr Kyrdan
body: Hi [@Vitor Oliveira](/t5/user/viewprofilepage/user-id/4319757)

Thank you for your question!

We are working on [serverless-deploy pipe](https://bitbucket.org/atlassian/serverless-deploy) upgrade.

And notify you about upgraded version soon!

Cheers,  
Oleksandr Kyrdan


Tags: bitbucket-pipelines

bitbucket-cloud

cloud
Codes from eclipse to commit to new bitbucket repository
Asked by tancs:

I got codes in 4 folders that are currently in eclipse, we want to now create a repository.

Do you have any guide to commit these codes to bitcucket via eclipse?

Appreciate feedback on this!


Answers:
author: Theodora Boudale
body: Hi [@tancs](/t5/user/viewprofilepage/user-id/4218076) and welcome to the community!

I don't believe that we have any guides for Eclipse specifically.

The documentation we have available focuses on using Git from command line:

* <https://www.atlassian.com/git/tutorials>

I assume that you're using EGit with Eclipse? I can see that Eclipse has documentation on EGit, and it looks quite detailed:

* <https://wiki.eclipse.org/EGit/User_Guide>

For initializing a repository with your existing source code, you can take a look here:

* <https://wiki.eclipse.org/EGit/User_Guide/Getting_Started>

Now, for linking a local repository you create with a Bitbucket repo, you'll need decide first if you want to use HTTPS (username \& password or app-password) or SSH for authentication.

The EGit tutorial has an example on how to set up a remote with GitHub, but you can follow the same steps to link a local repo with Bitbucket.

If you want to use HTTPS with the Bitbucket username and app password, you can take a look here on how to generate an app password:

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

If you prefer to use SSH, you can check here how to set up SSH keys for Bitbucket:

* <https://support.atlassian.com/bitbucket-cloud/docs/set-up-an-ssh-key/>

If you have any questions, please feel free to let us know.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Increase Build container memory to 16 gigs
Asked by argentum47:

I am trying to build a maven project and on my local machine the build takes up to 12 000 MB of memory. I've tried to reduce this but I was not successful. Is it possible to obtain more memory for the container that is performing the build beyond the 8GB we get by using size 2x? If I don't increase the memory then I will get "Container 'Build' exceeded memory limit" as an error


Answers:
author: Theodora Boudale
body: Hi [@argentum47](/t5/user/viewprofilepage/user-id/4325410) ,

I'm afraid that at the moment the maximum available memory for a Pipelines step is 8GB.

We have a feature request in our issue tracker for the ability to increase it further:

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

I would suggest that you add your vote in that feature request (by selecting the **Vote for this issue** link) as the number of votes helps the development team and product managers better understand the demand for features. You are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the **Start watching this issue** link) if you'd like to get notified via email on updates.

Implementation of features is done as per our policy [here](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html) and any updates will be posted in the feature request.

If you have any other questions, please feel free to let me know.

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-pipelines

cloud