Hi, > - could it be because I'm running on Gradle?
:-) well you are in the minoroty and the least tested path. However I do not see any dependency for cloudbees-folder in https://github.com/jenkinsci/job-dsl-plugin/blob/defect/org-folder-secrets/build.gradle#L21-L27 (but I admit I am not a regular gradle user so may be missing something)? Where have you declared this dependency? /James On Wednesday, June 29, 2022 at 9:38:09 AM UTC+1 [email protected] wrote: > According to https://www.jenkins.io/doc/developer/testing/ : > > > Depending on Other Plugins > <https://www.jenkins.io/doc/developer/testing/#depending-on-other-plugins> > > > Any Jenkins plugins that you add as dependencies to your POM with > <scope>test</scope> will be available in the Jenkins installations > created while running test cases, or when using mvn hpi:run > <https://www.jenkins.io/doc/developer/tutorial/run/>. > > > You can also apply the @WithPlugin > <https://javadoc.jenkins.io/component/jenkins-test-harness/?org/jvnet/hudson/test/recipes/WithPlugin.html> > > annotation to individual test cases, but this is rarely required. > However, when adding `testImplementation` and `testRuntimeOnly`, that > still doesn't work - could it be because I'm running on Gradle? > > On Wednesday, June 29, 2022 at 9:22:41 AM UTC+1 Jamie Tanna wrote: > >> When running the Jenkins Test Harness in tests via this branch >> <https://github.com/jenkinsci/job-dsl-plugin/tree/defect/org-folder-secrets>, >> >> I'm seeing the following error (bold for emphasis): >> >> 0.007 [id=1997] INFO >> o.jvnet.hudson.test.JenkinsRule#createWebServer: Running on >> http://localhost:42047/jenkins/ >> 0.027 [id=2012] INFO jenkins.InitReactorRunner$1#onAttained: >> Started initialization >> 0.028 [id=2026] INFO jenkins.InitReactorRunner$1#onAttained: >> Listed all plugins >> 0.077 [id=2016] INFO jenkins.InitReactorRunner$1#onAttained: >> Prepared all plugins >> 0.078 [id=2028] INFO jenkins.InitReactorRunner$1#onAttained: >> Started all plugins >> 0.165 [id=2037] INFO jenkins.InitReactorRunner$1#onAttained: >> Augmented all extensions >> 0.171 [id=2021] INFO jenkins.InitReactorRunner$1#onAttained: >> Loaded all jobs >> 0.175 [id=2027] INFO jenkins.InitReactorRunner$1#onAttained: >> Completed initialization >> 0.199 [seed #1] Legacy code started this job. No cause information is >> available >> 0.199 [seed #1] Running as SYSTEM >> 0.199 [seed #1] Building in workspace >> /tmp/jkh9605859418765359967/workspace/seed >> 0.199 [seed #1] Processing provided DSL script >> * 0.219 [seed #1] ERROR: (script, line 1) version 5.14 or later of >> plugin 'cloudbees-folder' needs to be installed* >> 0.220 [seed #1] Finished: FAILURE >> 0.221 [id=1997] INFO jenkins.model.Jenkins#cleanUp: Stopping >> Jenkins >> 0.230 [id=1997] INFO jenkins.model.Jenkins#cleanUp: Jenkins >> stopped >> >> How would I go about bootstrapping the plugin dependency for >> cloudbees-folder? It's down as an implementation dependency in the >> project, so I'd have assumed it'd work, but clearly not. >> >> Looks like potentially there's the `pluginManager.install` that I can >> use, is that the best bet? >> >> -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/1aac6993-6471-4dcb-ac6f-d619cc7ed004n%40googlegroups.com.
