[JIRA] (JENKINS-62040) pipeline cannot find and archiveArtifacts anchore.json after anchore plugin scan

2 views
Skip to first unread message

bai_sheng.guo@nokia-sbell.com (JIRA)

unread,
Apr 24, 2020, 4:03:04 AM4/24/20
to jenkinsc...@googlegroups.com
Anthony Guo created an issue
 
Jenkins / Bug JENKINS-62040
pipeline cannot find and archiveArtifacts anchore.json after anchore plugin scan
Issue Type: Bug Bug
Assignee: Marky Jackson
Components: anchore-container-scanner-plugin
Created: 2020-04-24 08:02
Environment: openstack, linux

Enterprise Client Version: 0.6.0
  Anchore Engine Version: 0.6.0
  Anchore DB Version: 0.0.12
Priority: Blocker Blocker
Reporter: Anthony Guo

1. Jenkins anchore plugin scan docker image,
then archive artifacts: '*/.json',
But no anchore.json archived, this anchore.json is missing

2. Jenkins anchore plugin scan docker image,
then archive artifacts: 'AnchoreReport.${JOB_BASE_NAME}_${BUILD_NUMBER}/*.json',
No artifacts found that match the file pattern "AnchoreReport.CSF-Anchore-Scan_82/*.json". Configuration error?

So, how to archive the anchore.json file?

Enterprise Client Version: 0.6.0
Anchore Engine Version: 0.6.0
Anchore DB Version: 0.0.12

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

marky.r.jackson@gmail.com (JIRA)

unread,
Apr 24, 2020, 8:09:04 AM4/24/20
to jenkinsc...@googlegroups.com

marky.r.jackson@gmail.com (JIRA)

unread,
Apr 24, 2020, 8:09:07 AM4/24/20
to jenkinsc...@googlegroups.com
Marky Jackson started work on Bug JENKINS-62040
 
Change By: Marky Jackson
Status: Open In Progress

bai_sheng.guo@nokia-sbell.com (JIRA)

unread,
Apr 25, 2020, 11:00:03 PM4/25/20
to jenkinsc...@googlegroups.com

bai_sheng.guo@nokia-sbell.com (JIRA)

unread,
Apr 25, 2020, 11:01:01 PM4/25/20
to jenkinsc...@googlegroups.com

bai_sheng.guo@nokia-sbell.com (JIRA)

unread,
Apr 25, 2020, 11:04:02 PM4/25/20
to jenkinsc...@googlegroups.com

bai_sheng.guo@nokia-sbell.com (JIRA)

unread,
Apr 25, 2020, 11:04:03 PM4/25/20
to jenkinsc...@googlegroups.com

bai_sheng.guo@nokia-sbell.com (JIRA)

unread,
Apr 25, 2020, 11:04:03 PM4/25/20
to jenkinsc...@googlegroups.com

marky.r.jackson@gmail.com (JIRA)

unread,
Apr 26, 2020, 12:46:03 AM4/26/20
to jenkinsc...@googlegroups.com

bai_sheng.guo@nokia-sbell.com (JIRA)

unread,
Apr 26, 2020, 1:01:03 AM4/26/20
to jenkinsc...@googlegroups.com

bai_sheng.guo@nokia-sbell.com (JIRA)

unread,
Apr 26, 2020, 2:23:02 AM4/26/20
to jenkinsc...@googlegroups.com

No artifacts found that match the file pattern '*/anchore.json' . Configuration error?
No artifacts found that match the file pattern 'anchore*.json' . Configuration error?

bai_sheng.guo@nokia-sbell.com (JIRA)

unread,
Apr 26, 2020, 2:24:03 AM4/26/20
to jenkinsc...@googlegroups.com
Anthony Guo edited a comment on Bug JENKINS-62040
No artifacts found that match the file pattern ' " **/anchore*.json ' " . Configuration error?

No artifacts found that match the file pattern
'   " anchore*.json ' " . Configuration error?

bai_sheng.guo@nokia-sbell.com (JIRA)

unread,
Apr 26, 2020, 2:25:01 AM4/26/20
to jenkinsc...@googlegroups.com
Anthony Guo edited a comment on Bug JENKINS-62040
No artifacts found that match the file pattern "** * /anchore* * .json" . Configuration error?

No artifacts found that match the file pattern  "anchore*.json" . Configuration error?

bai_sheng.guo@nokia-sbell.com (JIRA)

unread,
Apr 26, 2020, 2:26:02 AM4/26/20
to jenkinsc...@googlegroups.com
Anthony Guo edited a comment on Bug JENKINS-62040
No artifacts found that match the file pattern "***/anchore**.json" . Configuration error?

No artifacts found that match the file pattern  "anchore*.json" . Configuration error?


No artifacts found that match the file pattern  "*.json" . Configuration error?

bai_sheng.guo@nokia-sbell.com (JIRA)

unread,
Apr 26, 2020, 2:26:03 AM4/26/20
to jenkinsc...@googlegroups.com
Anthony Guo updated an issue
Change By: Anthony Guo
1.  Jenkins anchore plugin scan docker image,
then archive artifacts: '** * /* * .json',
But no anchore.json archived,  this anchore.json is missing

2.  Jenkins anchore plugin scan docker image,
then archive artifacts: 'AnchoreReport.${JOB_BASE_NAME}_${BUILD_NUMBER}/*.json',
No artifacts found that match the file pattern "AnchoreReport.CSF-Anchore-Scan_82/*.json". Configuration error?


So, how to  archive the anchore.json file?


Enterprise Client Version: 0.6.0
  Anchore Engine Version: 0.6.0
  Anchore DB Version: 0.0.12

bai_sheng.guo@nokia-sbell.com (JIRA)

unread,
Apr 26, 2020, 2:34:04 AM4/26/20
to jenkinsc...@googlegroups.com
Anthony Guo commented on Bug JENKINS-62040
 
Re: pipeline cannot find and archiveArtifacts anchore.json after anchore plugin scan

From jenkins console log:
.....
20:49:05 Archiving artifacts
20:49:05 ‘anchore*.json’ doesn’t match anything
20:49:05 No artifacts found that match the file pattern "anchore*.json". Configuration error?
.....

But then ====>>>>>> From job summary page:

Build Artifacts
anchore_gates.json 51.93 KB view
anchore_security.json 31.12 KB view
anchoreengine-api-response-evaluation-1.json 58.77 KB view
anchoreengine-api-response-evaluation-2.json 60.36 KB view
anchoreengine-api-response-evaluation-3.json 22.36 KB view
anchoreengine-api-response-vulnerabilities-1.json 54.31 KB view
anchoreengine-api-response-vulnerabilities-2.json 57.44 KB view
anchoreengine-api-response-vulnerabilities-3.json 3.32 KB view

https://build8.cci.myCompany.net/job/CTO/job/CSF/job/Common/job/CSF-CHARTS-PROMOTE/2648/artifact/AnchoreReport.CSF-CHARTS-PROMOTE_2648/anchore_security.json
https://build8.cci.myCompany.net/job/CTO/job/CSF/job/Common/job/CSF-CHARTS-PROMOTE/2648/artifact/AnchoreReport.CSF-CHARTS-PROMOTE_2648/anchore_gates.json

bai_sheng.guo@nokia-sbell.com (JIRA)

unread,
Apr 26, 2020, 2:36:02 AM4/26/20
to jenkinsc...@googlegroups.com
Anthony Guo edited a comment on Bug JENKINS-62040
From jenkins console log:
.....
20:49:05  Archiving artifacts
20:49:05  ‘anchore*.json’ doesn’t match anything
20:49:05  No artifacts found that match the file pattern "anchore*.json". Configuration error?


.....

But then ====>>>>>> From job summary page:

(sometimes there are build artifacts, sometimes no)

Build Artifacts
anchore_gates.json 51.93 KB  view
anchore_security.json 31.12 KB  view
anchoreengine-api-response-evaluation-1.json 58.77 KB  view
anchoreengine-api-response-evaluation-2.json 60.36 KB  view
anchoreengine-api-response-evaluation-3.json 22.36 KB  view
anchoreengine-api-response-vulnerabilities-1.json 54.31 KB  view
anchoreengine-api-response-vulnerabilities-2.json 57.44 KB  view
anchoreengine-api-response-vulnerabilities-3.json 3.32 KB  view



bai_sheng.guo@nokia-sbell.com (JIRA)

unread,
Apr 26, 2020, 3:01:03 AM4/26/20
to jenkinsc...@googlegroups.com
Anthony Guo updated an issue
Change By: Anthony Guo
1. Jenkins anchore plugin scan docker image,
then archive artifacts: '***/**.json',
But no anchore.json archived, this anchore.json is missing

2. Jenkins anchore plugin scan docker image,
then archive artifacts: 'AnchoreReport.${JOB_BASE_NAME}_${BUILD_NUMBER}/*.json',
No artifacts found that match the file pattern "AnchoreReport.CSF-Anchore-Scan_82/*.json". Configuration error?

 
*13:07:39*  ‘anchore*.json’ doesn’t match anything*


13:07:39*  No artifacts found that match the file pattern "anchore*.json". Configuration error?

 

So, how to archive the anchore.json file?

Enterprise Client Version: 0.6.0
Anchore Engine Version: 0.6.0
Anchore DB Version: 0.0.12

bai_sheng.guo@nokia-sbell.com (JIRA)

unread,
Apr 26, 2020, 3:01:03 AM4/26/20
to jenkinsc...@googlegroups.com
Anthony Guo updated an issue
1. Jenkins anchore plugin scan docker image,
then archive artifacts: '***/**.json',
But no anchore.json archived, this anchore.json is missing

2. Jenkins anchore plugin scan docker image,
then archive artifacts: 'AnchoreReport.${JOB_BASE_NAME}_${BUILD_NUMBER}/*.json',
No artifacts found that match the file pattern "AnchoreReport.CSF-Anchore-Scan_82/*.json". Configuration error?

 
*13:07:39*  ‘anchore*.json’ doesn’t match anything*13:07:39*  No artifacts found that match the file pattern "anchore*.json". Configuration error?

So, how to archive the anchore.json file?

Enterprise Client Version: 0.6.0
Anchore Engine Version: 0.6.0
Anchore DB Version: 0.0.12

marky.r.jackson@gmail.com (JIRA)

unread,
Apr 26, 2020, 3:05:02 AM4/26/20
to jenkinsc...@googlegroups.com

bai_sheng.guo@nokia-sbell.com (JIRA)

unread,
Apr 28, 2020, 4:37:04 AM4/28/20
to jenkinsc...@googlegroups.com

marky.r.jackson@gmail.com (JIRA)

unread,
Apr 28, 2020, 9:37:02 AM4/28/20
to jenkinsc...@googlegroups.com

My apologies for the delayed reply.

I tried reproducing this and could not. In looking at your Jenkinsfile, I see that you are using a library, that could be suspect. Can you provide the logs from Managed Jenkins>System Logs

walthhy@163.com (JIRA)

unread,
Apr 29, 2020, 9:59:02 PM4/29/20
to jenkinsc...@googlegroups.com
Tony Wen commented on Bug JENKINS-62040

From anchore plugin src, seems anchore plugin itself does archiving some json results, and in then end, clear the anchor folder, could it be the cause? If it is, why we can see them sometime?

marky.r.jackson@gmail.com (JIRA)

unread,
Apr 29, 2020, 10:30:03 PM4/29/20
to jenkinsc...@googlegroups.com

Tony Wen you are correct. A directory with all the vulnerability data is what you are referring to, in most cases you should not see that because of the clean up that takes place. In some edge cases, that clean up doesn't happen and that is why you see it. 

marky.r.jackson@gmail.com (JIRA)

unread,
Apr 30, 2020, 8:44:03 AM4/30/20
to jenkinsc...@googlegroups.com

I will leave.this open in till Friday. I think the main answer is mine from yesterday.
Let me know if I am misinterpreting

walthhy@163.com (JIRA)

unread,
Apr 30, 2020, 9:13:04 PM4/30/20
to jenkinsc...@googlegroups.com
Tony Wen commented on Bug JENKINS-62040

Marky Jackson, thanks. we still have questions, forgive me not familiar with plugin code.

Could you help us identifying under which condition we will have aritifacts.

  1. which artifacts/json report will be archived automatically under which condition
  2. when clean up case will be executed and when not?
  3. is it possible to keep those json output always?

marky.r.jackson@gmail.com (JIRA)

unread,
Apr 30, 2020, 9:17:03 PM4/30/20
to jenkinsc...@googlegroups.com
  1. The scan keeps a report of vulnerabilities and policy evaluations. This happens during each scan
  2. Clean up should always take place unless there was some edge case that stopped that from happening. Network latency, Jenkins hiccup, etc.
  3. Depending on how your scan job is configured, all jobs should retain the output of the report and there is a historical linkage in your workspace.

 

Hope that helps

marky.r.jackson@gmail.com (JIRA)

unread,
May 4, 2020, 10:10:14 PM5/4/20
to jenkinsc...@googlegroups.com
Marky Jackson closed an issue as Cannot Reproduce
 
Change By: Marky Jackson
Status: In Progress Closed
Resolution: Cannot Reproduce

bai_sheng.guo@nokia-sbell.com (JIRA)

unread,
May 5, 2020, 11:03:02 PM5/5/20
to jenkinsc...@googlegroups.com
Anthony Guo commented on Bug JENKINS-62040
 
Re: pipeline cannot find and archiveArtifacts anchore.json after anchore plugin scan

Hi  Marky Jackson ,  How to config the job to keep the output report (*.json files) ?  

 

bai_sheng.guo@nokia-sbell.com (JIRA)

unread,
May 7, 2020, 2:41:02 AM5/7/20
to jenkinsc...@googlegroups.com
Anthony Guo reopened an issue
 
Change By: Anthony Guo
Resolution: Cannot Reproduce
Status: Closed Reopened

marky.r.jackson@gmail.com (JIRA)

unread,
May 7, 2020, 4:20:03 AM5/7/20
to jenkinsc...@googlegroups.com

marky.r.jackson@gmail.com (JIRA)

unread,
May 7, 2020, 4:22:03 AM5/7/20
to jenkinsc...@googlegroups.com
Marky Jackson commented on Bug JENKINS-62040
 
Re: pipeline cannot find and archiveArtifacts anchore.json after anchore plugin scan

I would need to test that. I can do that but it will be a couple of days due to other priorities.

i changed the severity of this because saving the data is not the intended use case.

i will update in a day of 2

Reply all
Reply to author
Forward
0 new messages