Hi
I am getting "Failed to add an attachment. No such file index.html" error
This is my bitbucket-pipeline.yml file code
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:
- cd config/geb
- ./gradlew -S clean browerstackchTest
- echo "Manual trigger for QA2!"
after-script: # on failed builds send notifications to e-mail lists in addition to the committer
- if [ "${BITBUCKET_EXIT_CODE}" == "0" ]; then exit 0; else echo "gradle build step failed"; fi
- pipe: atlassian/email-notify:0.3.11
variables:
<<: *email-notify-config
TO: 'email@email.com'
SUBJECT: "Test result"
BODY_PLAIN: |
Please find the attached test result report to the email.
ATTACHMENTS: 'index.html'
I see it recognizes the report path
* What went wrong:
Execution failed for task ':browserstackchromeTest'.
> There were failing tests. See the report at: file:///opt/atlassian/pipelines/agent/build/config/geb/build/reports/browserstackchromeTest/tests/index.html
Hi @Shubhendu Pandey ,
thank you for your feedback!
Try to provide full path to the index.html file instead of the filename only:
ATTACHMENTS: reports/browserstackchromeTest/tests/index.html
Thank you for your reply.
ATTACHMENTS: reports/browserstackchromeTest/tests/index.html
Above is not working, I am getting the same error i.e "Failed to add an attachment. No such file index.html"
I also tried below things
ATTACHMENTS: build/reports/browserstackchromeTest/tests/index.html
ATTACHMENTS: 'reports/browserstackchromeTest/tests/index.html'
But no luck so far
Here is screenshot of error message
-----------------------------------------------------------------------------------------------------------------------------------
Question:- Do I have to first create artifact in order to access this file?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Shubhendu Pandey oh, you have two build directories in your path, then try:
ATTACHMENTS: config/geb/build/reports/browserstackchromeTest/tests/index.html
Note! /opt/atlassian/pipelines/agent/build/ is step's work directory.
Value stored in the variable BITBUCKET_CLONE_DIR.
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.