You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
I want to automatically build a LaTex document (step 1) and after that send the generated .pdf file via e-mail as attachment (step 2).
STEP 1: (WORKS)
image: dme26/latex-builder:latest
pipelines:
branches:
master:
- step:
script:
- pdflatex
-jobname=Test Test.tex; - pdflatex -jobname=Test Test; - ls - curl -X POST "https://${BB_AUTH_STRING}@api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"Test"
STEP 2: (ERROR)
- step:
script:
- pipe: atlassian/email-notify:0.4.2
variables:
USERNAME: $EMAIL_ADDRESS
PASSWORD: $EMAIL_PW
FROM: $EMAIL_ADDRESS
TO: $ANOTHER_EMAIL_ADDRESS
HOST: 'smtp.googlemail.com'
#ATTACHMENTS: 'Test.pdf' #SEND generated .pdf
Hi @pascal_schroeer ,
thank you for your question!
In your case, artifacts will help you to share generated pdf-file with the next steps:
image: dme26/latex-builder:latest
pipelines:
default:
- step:
name: Build the pdf
script:
- pdflatex --shell-escape Test.tex
artifacts:
- Test.pdf
- step:
name: Upload to Bitbucket Downloads
script:
- pipe: atlassian/bitbucket-upload-file:0.3.2
variables:
BITBUCKET_USERNAME: $BITBUCKET_USERNAME
BITBUCKET_APP_PASSWORD: $BITBUCKET_APP_PASSWORD
FILENAME: 'Test.pdf'
- step:
name: Send email
script:
- pipe: atlassian/email-notify:0.4.2
variables:
USERNAME: $EMAIL_ADDRESS
PASSWORD: $EMAIL_PW
FROM: $EMAIL_ADDRESS
TO: $ANOTHER_EMAIL_ADDRESS
HOST: 'smtp.googlemail.com'
ATTACHMENTS: 'Test.pdf'
Also, it's a best practice to separate build and upload/send steps.
Cheers,
Oleksandr
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
Thanks for your explanation! I changed my pipeline code to your suggestion.
But there are still two open points.
Best Regards!
Pascal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.