Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Bitbucket pipeline, Email not getting send to me when attachment is a zip file 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

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 

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

Like Galyna Zholtkevych likes this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket Pipelines

Bitbucket Pipelines Runners is now in open beta

We are excited to announce the open beta program for self-hosted runners. Bitbucket Pipelines Runners is available to everyone. Please try it and let us know your feedback. If you have any issue...

733 views 15 10
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you