jfrog / jenkins-jfrog-plugin

Easy integration between Jenkins and the JFrog Platform.
https://github.com/jfrog/jenkins-jfrog-plugin
Apache License 2.0
40 stars 18 forks source link

JFrog plugin - Local jfrog CLI Scan result output into a Junit-formatted file #21

Open Ceddaerrix opened 1 year ago

Ceddaerrix commented 1 year ago

Is your feature request related to a problem? Please describe.

When the Jenkins with a stage as follow:

stage('Apply JFrog X-Ray Scanning') {
tools { jfrog 'jfrog-cli' }
steps {
    script {                    
        // Show the installed version of JFrog CLI.
        jf '-v'

        // Show the configured JFrog Platform instances.
        jf 'c show'

        // Ping Artifactory.
        jf 'rt ping'

        // Start local X-Ray scan
        jf "scan ${WORKSPACE}/**/my-artifact.tar.gz"
    }
}

The scan results are shown in the build log/stdout as a table (the default format). Such output would be very useful in the Jenkins build if it could be persisted as a build artifact (with the archiveArtifacts step) or as tests results (with the Junit step).

Describe the solution you'd like to see

Multiple approaches on the matter:

Describe alternatives you've considered

No response

Additional context

No response