I am sending this path to Attachments variable under email-notify:
TO: 'myemail@example.com'
HOST: 'smtp.gmail.com'
SUBJECT: 'Bitbucket Pipe Notification'
+ ATTACHMENTS: 'TestResults/TestReports/*.html'
However it gives this error.
I want to know if we can use glob pattern here or how can we select latest file from Downloads folder of bitbucket repository and send its name here.
Hi @Nishita Agarwal,
Welcome to the community.
Unfortunately, the atlassian/email-notify Pipes script does not support glob pattern.
It has to be the exact file name(s) located within your cloned repository directory in Pipelines.
You mentioned selecting the latest file from the Downloads folder of your Bitbucket repository, would you be able to confirm if you're referring to an actual "downloads" folder located inside your repository or you're referring to the repository Downloads tab?
Regards,
Mark C
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Nishita Agarwal,
Thanks for that information.
Unfortunately, it is not possible for you to download the latest file in your repository Downloads tab.
You'll need to identify the file name you'd like to download and reference it as an attachment to the atlassian/email-notify Pipes script.
Here's a sample CURL command on how to download a specific file in a repository Downloads tab that you can add to your YAML script:
curl -u "bb_username:app_password" --location --request GET "https://api.bitbucket.org/2.0/repositories/workspace_id/repo_name/downloads/test_file.zip" --output test_file.zip
Once done, you can use the file test_file.zip as an attachment.
Hope it helps and do let me know if you have further questions.
Regards,
Mark C
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.