jfrog / jenkins-artifactory-plugin

Jenkins artifactory plugin
http://jenkins-ci.org/
114 stars 186 forks source link

The "printTable" flag in the Xray scan stage is writing the output in the jenkins.log file #839

Open shashwathrai opened 1 year ago

shashwathrai commented 1 year ago

Describe the bug The "printTable" flag in the Xray scan stage is writing the output in the jenkins.log file with no hint on the build name details or the Jenkins job details. The flag is meant to print the output in the Console.

To Reproduce Below Jenkins script is used to scan the Builds present in Artifactory using the Jenkins Artifactory plugin.

node {
    def server
 stage ('XrayScan') {
        server = Artifactory.server 'jfrog'
 }
    def scanConfig = [
    'buildName'      : 'build_name',
    'buildNumber'    : 'build_number',
    'printTable' : true
  ]
  def scanResult = server.xrayScan scanConfig
  echo scanResult as String
}

Expected behavior It should only print the table output of vulnerabilities in the Console not in the jenkins.log.

Screenshots Console output which is working as expected.

image

Output from the jenkins.log file.

image

Versions