- Newest
- Most votes
- Most comments
Hello,
If you get the log "No PDF file found". It's maybe because your app didn't generate a PDF file. Could you please double check inside the EC2 if the reports folder has been generated?
Here is how to do it:
- Connect to
ec2-<AWS_REGION>-test-cases - Retrieve the container ID of the tomcat container with the command:
docker ps - Then run
docker exec -it <CONTAINER_ID> bash - Check in the CATALINA_HOME folder if there's a reports folder
Hope it helps 😊
To view the generated PDF files in Jenkins when using the AWS Blu Age DevOps Pipeline, you'll need to modify the pipeline configuration to include these files in the artifacts that are collected and stored after the build process.
The issue you're experiencing is likely because the pipeline is not configured to capture and store the PDF files generated in the workingDir/reports/<subfolder> directory.
To resolve this, you should update your pipeline configuration to include these files as artifacts. This typically involves modifying your buildspec.yml file or the relevant Jenkins job configuration.
Here's a general approach you can take:
-
Locate your buildspec.yml file or the Jenkins job configuration that defines your build process.
-
Add a step to copy or move the generated PDF files to a location that is included in the artifacts collection process.
-
Update the artifacts section of your configuration to include the directory where the PDF files are located.
For example, you might add a command to copy the PDF files to a specific directory that's already included in your artifacts, or you could modify the artifacts section to explicitly include the workingDir/reports directory.
If you're using AWS CodeBuild as part of your pipeline, you might add something like this to your buildspec.yml:
artifacts: files: - '**/*' name: my-artifact-name base-directory: 'workingDir/reports'
This would include all files from the workingDir/reports directory in your build artifacts.
After making these changes, rebuild your pipeline. The PDF files should then be available for viewing in Jenkins after the build process completes.
Remember to adjust the paths and commands according to your specific project structure and requirements. Also, ensure that the IAM roles associated with your build process have the necessary permissions to access and copy these files.
If you continue to face issues, you may need to investigate whether the PDF files are actually being generated in the expected location during the build process, or if there are any permission issues preventing access to these files.
Sources
How to create a folder in Tomcat working directory before running test cases with the AWS Blu Age Devops Pipeline ? | AWS re:Post
Disk space issue for build executor in AWS Blu Age Devops Pipeline | AWS re:Post
Relevant content
- AWS OFFICIALUpdated 2 years ago
