2

I tried triggering the Xray Scan from Jenkins through the jFrog server as specified in their documentation.

The pipeline code used is as follows:

node {
        stage('XRAY Scan') { 
            def server = Artifactory.server('jFrogServer')    
            def buildInfo = Artifactory.newBuildInfo()

            buildInfo.env.capture = true

            def scanConfig = [
                'buildName'      : buildInfo.name,
                'buildNumber'    : buildInfo.number,
                'failBuild'      : true
                ]    
            def scanResult = server.xrayScan(scanConfig)
            echo scanResult as String
        }
} 

When this pipeline is executed, I get the following response in the console:

Xray scan connection lost: Artifactory response: Forbidden, attempting to reconnect...

Arghya
  • 240
  • 1
  • 16

1 Answers1

1

I met this issue, all three times are the build info is missing or can't be found(by build name and build id), for example, the build info is not published to jfrog artifactory or the build name + id didn't match between jfrog and jenkins.

Dharman
  • 30,962
  • 25
  • 85
  • 135
chen Yehua
  • 11
  • 1