Unable to publish artifact Non required job artifact Http Compression Off
Asked by swati.awate:

Hi.

I had started my bamboo server on remote agent. Installed my plugin build and performed scan which generates pdf report and it should be visible on artifact. But it is giving me error message as:

Unable to publish artifact Non required job artifact Http Compression Off : \[PDF Report\], patterns:

Can you please help me with this


Answers:
author: Shashank Kumar
body: .


author: Shashank Kumar
body: Hello Swati,

Welcome to Atlassian community.

The above error usually means that there are some mismatch with the way the artifact definition for the Job and the actual artifact which has been generated.

This can either be Artifact pattern, location where Bamboo is expecting it etc.

Can you go to the Job where you have defined this artifact and check it's definition and see if everything is correct, refer the below screen to check the parameters.

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/309454i8A5D7A2EA28148FE/image-size/large?v=v2&px=999 "image.png")  

BTW which plugin you are using to Build ?

Regards,

Shashank Kumar

**\*\*please don't forget to Accept the answer if your query was answered\*\***

comments: author: swati.awate
body: ![Screenshot 2024-02-29 214928.png](https://community.atlassian.com/t5/image/serverpage/image-id/309475iA9066214774EEACE/image-size/large?v=v2&px=999 "Screenshot 2024-02-29 214928.png")![Screenshot 2024-02-29 215106.png](https://community.atlassian.com/t5/image/serverpage/image-id/309477iE078B233FB0FA228/image-size/large?v=v2&px=999 "Screenshot 2024-02-29 215106.png")As mentioned I made these settings, I did not get any error in log but at artifact it is not showing any pdf. Can you send entire setting to be done related to artifact.


author: Shashank Kumar
body: Hey Swati,

You've not specified a location within your Build directory where your Artifact would be located, this is a relative path inside your Build directory, this needs to be mentioned under location field in the above attachment.

If you open your Build directory for the build which failed, where are you able to see the PDF files? can you paste the location here?

Read [Bamboo artifact definition syntax examples](https://confluence.atlassian.com/bamkb/bamboo-artifact-definition-syntax-examples-815581285.html) for more details.

Regards,

Shashank Kumar


author: swati.awate
body: Hi Shashank,

Thanks for your input, it worked. But issue is at particular location there are multiple pdf getting generated with timestamp pattern. I want it should get latest generated pdf and download it on artifact.


author: swati.awate
body: And 1 more doubt I had this Edit Artifact Definition we have to configure for each plan. Is there any global setting for this? So that all the projects will have same global setting for plan


author: Shashank Kumar
body: Hi Swati,

For your first query as far as I am aware you can't define artifacts to be generated with the modified time, currently your definition says **\*.pdf** so Bamboo will pick all the files with this pattern and generate the artifact. If you want to filter it then you'll need to either give a specific file name or a more filtered location.

Probably you can look to enable **Job -\> other -\> "Clean working directory after each build"**option so that older artifacts ( older .pdf files ) are cleaned up and only the latest files with .pdf extension are present.

For the second query artifact definition is specific to each Job for each Plan, there is no Global setting to define it at bulk.

Regards,

Shashank Kumar


author: swati.awate
body: Hi Shashank. After enable checkbox "**Clean working directory after each build"** I am able to see single file in my Artifact section. But where PDFs are available that it works even after the clean up of build directory?


author: Shashank Kumar
body: Hello Swati,

These PDF files will move to the Artifact location which you have specified on your bamboo.cfg.xml file, probably on your Bamboo server.

```
<property name="bamboo.artifacts.directory">${bambooSharedHome}/artifacts</property>
```

This page <https://confluence.atlassian.com/bamkb/artifacts-in-bamboo-server-829052138.html> can help you locate that on Bamboo server.

Regards,

Shashank Kumar


author: swati.awate
body: Hi Shashank.

I did similar setup on Data center but on artifact section I am able to download PDF where in on Summary Section PDF is not visible.

URL of Artifact Section: "http://\*\*\*/bamboo/browse/PDFGEN-TES2-9/artifact/JOB1/PDFReport/\*\*\*.pdf"

URL of Summary Section: "http://\*\*\*/browse/PDFGEN-TES2-9/artifact/JOB1/PDFReport/\*\*\*.pdf"


author: Shashank Kumar
body: Hello Swati,

Artifact will only be displayed in the Summary section if while defining the artifact you have selected it to be **shared**. See below

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/310518iCFCA6A2C26531C3F/image-size/large?v=v2&px=999 "image.png")


author: swati.awate
body: It worked. But without checking shared checkbox it had worked on Bamboo server+ remote agent. I was able to generate PDF report on both summary and Artifact section. Why similar configurations did not work for Data center? Why it worked after we checked Shared checkbox?


author: swati.awate
body: hi [@Shashank Kumar](/t5/user/viewprofilepage/user-id/4693340) ,Getting below error while Generate PDF checkbox is unchecked. How to fix this issue

```
simple 26-Mar-2024 06:18:43 Publishing an artifact: PDFReporterror 26-Mar-2024 06:18:43 Unable to publish artifact [PDFReport]: the source directory /***/build-dir/PDFGEN-TES2-JOB1/*** does not exist.simple 26-Mar-2024 06:18:43 The artifact hasn't been successfully published after 329.1 ?ssimple 26-Mar-2024 06:18:43 Successfully removed working directory at '/***/build-dir/PDFGEN-TES2-JOB1'simple 26-Mar-2024 06:18:43 Finalising the build...simple 26-Mar-2024 06:18:43 Stopping timer.simple 26-Mar-2024 06:18:43 Build PDFGEN-TES2-JOB1-20 completed.
```


author: swati.awate
body: Hi [@Shashank Kumar](/t5/user/viewprofilepage/user-id/4693340) ,

Can you please check this issue I am facing.

link : [Unable to generate PDF in Summary Section (atlassian.com)](https://community.atlassian.com/t5/Bamboo-questions/Unable-to-generate-PDF-in-Summary-Section/qaq-p/2650919#M33691)

comments: author: Shashank Kumar
body: Hello Swati,

Thanks for posting the question on community, I am not available currently to check the new issue, I would expect some other community members to reply to the issue soon.

If this is urgent for you and if you have a valid SEN please raise a support request with Atlassian.

Regards,

Shashank Kumar


author: swati.awate
body: Continuing above issue on community:

[Unable to generate PDF in Summary Section (atlassian.com)](https://community.atlassian.com/t5/Bamboo-questions/Unable-to-generate-PDF-in-Summary-Section/qaq-p/2650919#M33691)