Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bitbucket pipeline, Email not getting send to me when attachment is a zip file

Shubhendu Pandey July 30, 2020 edited

Hi, 
When I try to send an HTML file as an attachment then I am able to receive an email from the bitbucket pipeline but when I am trying to send a Zip file then I am seeing a error "Failed to send email to email@email.com. Check your configuration settings."

 

screenshot22_09_02.png

Note: I am not the admin of this repository, Do I need to ask an admin to make some changes?

 

Yml file , Attachment is an HTML file


custom: # Pipelines that can only be triggered manually
QA2: # The name that is displayed in the list in the Bitbucket Cloud GUI
- step:
image: openjdk:8
caches:
- gradle
size: 2x # double resources available for this step to 8G
script:
- apt-get update
- apt-get install zip
- cd config/geb
- ./gradlew -DBASE_URL=qa2 clean BSchrome_win
- cd build/reports
- zip -r testresult.zip BSchrome_winTest

after-script: # On test execution completion or build failure, send test report to e-mail lists
- pipe: atlassian/email-notify:0.3.11
variables:
<<: *email-notify-config
TO: 'email@email.com'
SUBJECT: "Test result for QA2 environment"
BODY_PLAIN: |
Please find the attached test result report to the email.
ATTACHMENTS: config/geb/build/reports/BSchrome_winTest/tests/index.html

 

Yml file, attachment is a zip file

custom: # Pipelines that can only be triggered manually
QA2: # The name that is displayed in the list in the Bitbucket Cloud GUI
- step:
image: openjdk:8
caches:
- gradle
size: 2x # double resources available for this step to 8G
script:
- apt-get update
- apt-get install zip
- cd config/geb
- ./gradlew -DBASE_URL=qa2 clean BSchrome_win # This step fails
- cd build/reports
- zip -r testresult.zip BSchrome_winTest

after-script: # On test execution completion or build failure, send test report to e-mail lists
- pipe: atlassian/email-notify:0.3.11
variables:
<<: *email-notify-config
TO: 'email@email.com'
SUBJECT: "Test result for QA2 environment"
BODY_PLAIN: |
Please find the attached test result report to the email.
ATTACHMENTS: config/geb/build/reports/testresult.zip

UPDATE:-

Found out that, My zip file includes a ".js" that's why I can't send it as an attachment, 

screenshot09_58_19.png

One solution I think is to create an artifact and send a bitbucket pipeline link in the email, but many business people have not accessed to repo

Another solution could be to send it as a drive attachment. I like this one but I am not sure how to send zip file as a drive attachment using "atlassian/email-notify:0.3.11" ?

1 answer

1 accepted

0 votes
Answer accepted
Halyna Berezovska
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 6, 2020 edited

Hello @Shubhendu Pandey , thank you for reporting.

As a workaround I can propose two solutions:

- zip archive without executable files , due to security , indeed, you are right, google does not allow such files to prevent some malware https://support.google.com/mail/answer/6584

- or send drive link in a message if this satisfy your case

It is also a good idea for writing custom pipe that will be uploading your archive to drive. Follow this guide How to write custom pipe 

Shubhendu Pandey August 6, 2020

I implemented a different report that doesn't create a.js file. I will checkout the custom pipe.Thanks 

Like Halyna Berezovska likes this

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, compass, developer experience, devex, platform engineering, internal developer platform, component catalog, atlassian learning, productivity tools, developer productivity, software architecture, compass webinar, engineering teams

Discover how Compass drives DevEx and productivity at Atlassian 🏃🏻‍♂️

Learn why Compass was built to tackle dev experience at scale. See how Atlassian uses it to boost visibility, reduce cognitive load, and drive consistency—plus tips to get started and customize your IDP for stronger team engagement.

Join the webinar ✨
AUG Leaders

Atlassian Community Events