I just wanted to extend my Bitbucket pipeline to send more than one attachment via Mail. For this I use the following .yml file:
image: dme26/latex-builder:latestpipelines:default: - step:name: Build the .pdfscript: - cd LaTeX - pdflatex Installation-Plan.tex - pdflatex Installation-Plan.texartifacts: - LaTeX/Installation-Plan.pdf - Data/data.csv - step:name: Upload to Bitbucket Downloadsscript: - pipe: atlassian/bitbucket-upload-file:0.7.1variables:BITBUCKET_USERNAME: '$BITBUCKET_USERNAME'BITBUCKET_APP_PASSWORD: '$BITBUCKET_APP_PASSWORD'FILENAME: 'LaTeX/Installation-Plan.pdf' - pipe: atlassian/bitbucket-upload-file:0.7.1variables:BITBUCKET_USERNAME: '$BITBUCKET_USERNAME'BITBUCKET_APP_PASSWORD: '$BITBUCKET_APP_PASSWORD'FILENAME: 'Data/data.csv' - step:name: Send emailscript: - MY_DATE=${MY_DATE:-$(date +%Y-%m-%d)} - pipe: atlassian/email-notify:0.13.1variables:USERNAME: '$GMAIL_MAIL'PASSWORD: '$GMAIL_APP_PASSWORD'FROM: smtp.my@gmail.comTO: 'myMail@icloud.com, mySecondMail@web.de'HOST: 'smtp.gmail.com'PORT: 587SUBJECT: '$MY_DATE Installation-Plan'ATTACHMENTS: 'LaTeX/Installation-Plan.pdf,Data/data.csv'
script: - pipe: atlassian/email-notify:0.13.1 variables: USERNAME: 'myemail@example.com' PASSWORD: $PASSWORD FROM: 'myemail@example.com' TO: 'example@example.com' HOST: 'smtp.gmail.com' ATTACHMENTS: 'file1.txt,file2.txt'
In my in inbox I see this:
So two attachments are mentioned, but only the file „data.csv“ is attached.
@pascal_schroeer hi. I used this pipe by myself and see the two files.Regards, Igor
Hmm for me it is not working. I tried also different mail addresses, but still the same issue...
@pascal_schroeer . Maybe you have problems with the second file. Try to attach only problem file to exclude this reason.Regards, Igor
It looks like you're new here. Sign in or register to get started.