Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PluginDepndencies: version 5.14 or later of plugin 'cloudbees-folder' needs to be installed #104

Open
PavelKa opened this issue Feb 9, 2021 · 0 comments

Comments

@PavelKa
Copy link

PavelKa commented Feb 9, 2021

Hello, I trying to use Your plugin to test jobDsl including folder creation. To simulate my issue I've extended example:
I've added dependency to :

pluginDependencies {   ...
    dependency("org.jenkins-ci.plugins", "pipeline-input-step", "2.8");
    dependency("org.jenkins-ci.plugins", "job-dsl", "1.77");
    dependency("org.jenkins-ci.plugins", "cloudbees-folder", "6.1.2");

I've added new test into VarsExampleJunitTest:

 //@WithPlugin("cloudbees-folder-6.1.2.hpi")
  @Test
  void "testing DSL folder"() {
    final CpsFlowDefinition flow = new CpsFlowDefinition('''
        node {
          jobDsl scriptText: "folder ('my folder')"
          echo 'hello stuff\'
        }
    '''.stripIndent(), true)
    final WorkflowJob workflowJob = rule.createProject(WorkflowJob, 'project')
    workflowJob.definition = flow
    rule.assertLogContains('hello stuff', rule.buildAndAssertSuccess(workflowJob))
  }
}

But when I run the test the following error occurs :

ERROR: (script, line 1) version 5.14 or later of plugin 'cloudbees-folder' needs to be installed

It looks that cloudbees folder plugin is not properly installed although job-dsl plugin works well.
I made a simple workaround using annotation @WithPlugin("cloudbees-folder-6.1.2.hpi") (plugin has to be placed in resource folder...) as You can see in the code above and then the test succeeded.
Any idea why the cloudbees-folder plugin installed using pluginDepndencies is not working ?
Or can You give me any advice how to investigate the problem?
Thanks' Pavel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant