Did you figure out how to do this? I just updated to v5 and am running into 
the same issues.


On Tuesday, August 6, 2019 at 8:01:48 AM UTC-7, ya wrote:
>
> Hi all. 
> We use jenkins pipelines and want start migrate to new version of OWASP 
> Dependency-Check plugin, but can't understand new syntax.
> On github page 
> <https://github.com/jenkinsci/dependency-check-plugin/wiki/v5-Migration> we 
> find only description of new version. 
> On jenkins wiki 
> <https://wiki.jenkins.io/display/JENKINS/OWASP+Dependency-Check+Plugin> we 
> find only free style project example.
> On jenkins 
> <https://jenkins.io/doc/pipeline/steps/dependency-check-jenkins-plugin/> we 
> find new method dependencyCheck without examples. And on google we can't 
> find any reference about new syntax.
>
> Our stage in 4.* version
> stage("Dependency Check") {
>      dependencyCheckAnalyzer datadir: 'dependency-check-data', 
> isFailOnErrorDisabled: true, hintsFile: '', includeCsvReports: false, 
> includeHtmlReports: true, includeJsonReports: false, isAutoupdateDisabled: 
> false, outdir: '', scanpath: '', skipOnScmChange: false, 
> skipOnUpstreamChange: false, suppressionFile: '', zipExtensions: ''
>      dependencyCheckPublisher canComputeNew: false, defaultEncoding: '', 
> healthy: '', pattern: '', unHealthy: ''
>      archiveArtifacts allowEmptyArchive: true, artifacts: 
> '**/dependency-check-report.*', onlyIfSuccessful: true    
>   }
>
> So in new version jenkins write: java.lang.NoSuchMethodError: No such DSL 
> method 'dependencyCheckAnalyzer' , we understand this cause. 
>
> But when we try do somethink like this in new version, we have just 
> errors: 
>  stage("Dependency Check") {
>     dependency-check //or dependencycheck or dependencyCheck
>     dependencyCheckPublisher canComputeNew: false, defaultEncoding: '', 
> healthy: '', pattern: '', unHealthy: ''
>     archiveArtifacts allowEmptyArchive: true, artifacts: 
> '**/dependency-check-report.*', onlyIfSuccessful: true
>   }
> ERROR:
>
> groovy.lang.MissingPropertyException: No such property: dependency for class: 
> WorkflowScript
>
>
> Another try:
>
> stage("Dependency Check") {
>     dependencyCheck datadir: 'dependency-check-data', isFailOnErrorDisabled: 
> true, hintsFile: '', includeCsvReports: false, includeHtmlReports: true, 
> includeJsonReports: false, isAutoupdateDisabled: false, outdir: '', scanpath: 
> '', skipOnScmChange: false, skipOnUpstreamChange: false, suppressionFile: '', 
> zipExtensions: '' 
>     dependencyCheckPublisher canComputeNew: false, defaultEncoding: '', 
> healthy: '', pattern: '', unHealthy: ''
>     archiveArtifacts allowEmptyArchive: true, artifacts: 
> '**/dependency-check-report.*', onlyIfSuccessful: true
>   }
> ERROR:
>
> [DependencyCheck] A Dependency-Check installation was not specified. Please 
> configure the build and specify a Dependency-Check installation to use.
>
>
> Another try:
> stage("Dependency Check") {
>     dependency-check datadir: 'dependency-check-data', isFailOnErrorDisabled: 
> true, hintsFile: '', includeCsvReports: false, includeHtmlReports: true, 
> includeJsonReports: false, isAutoupdateDisabled: false, outdir: '', scanpath: 
> '', skipOnScmChange: false, skipOnUpstreamChange: false, suppressionFile: '', 
> zipExtensions: '' 
>     dependencyCheckPublisher canComputeNew: false, defaultEncoding: '', 
> healthy: '', pattern: '', unHealthy: ''
>     archiveArtifacts allowEmptyArchive: true, artifacts: 
> '**/dependency-check-report.*', onlyIfSuccessful: true
>   }
> ERROR: 
>
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup 
> failed:
> WorkflowScript: 15: expecting '}', found 'datadir' @ line 15, column 26.
>            dependency-check datadir: 'dependency-check-data', 
> isFailOnErrorDisabled: true, hintsFile: '', includeCsvReports: false, 
> includeHtmlReports: true, includeJsonReports: false, isAutoupdateDisabled: 
> false, outdir: '', scanpath: '', skipOnScmChange: false, 
> skipOnUpstreamChange: false, suppressionFile: '', zipExtensions: '' 
>
>
>
> And we read this github description 
> <https://github.com/jeremylong/DependencyCheck>, so we need to just use bash 
> command in our pipeline to start a dependency check?
> Maybe someone who use pipelines with dependency check can write examples how 
> to use new version of dependency check with pipelines?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/e3cfbd74-5384-4313-9311-1ab96bf0a966o%40googlegroups.com.

Reply via email to