-
Notifications
You must be signed in to change notification settings - Fork 9
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
compilation with plugin job-dsl-core:1.57 failing #57
Comments
Hi @rgaduput, the problem here is that the interface of the JobManagement class has changed between these Job DSL versions. As a result, it is not possible to compile the plugin with an old Job DSL version like 1.57. Did you try to compile your Job DSL scripts with the latest version? Usually it is not much effort to upgrade your scripts. |
Hi @mnonnenmacher , Exception in thread "main" javaposse.jobdsl.dsl.DslScriptException: (RMRTUtilities.groovy, line 2410) No signature of method: javaposse.jobdsl.dsl.helpers.step.StepContext.ansiblePlaybook() is applicable for argument types: (java.lang.String, com.amdocs.rm.ci.lib.rt.RMRTUtilities$_refUpgradeDBPatch_closure41$_closure258$_closure262) values: [/tccc/adjcc9/PCI_TOOLS/Scripts/ACD/pre_tasks/pre_installation.yaml, ...] |
Support for this plugin is not part of job-dsl-core, but the plugin provides an extension [1]. This is not yet supported by this Gradle plugin, but something I am working on [2]. Unfortunately I cannot give an estimate on how long the implementation will take. Until then you can always use a configure block [3] to configure the plugin. Of course this is not as convenient as using the extension, but it works pretty well. Another option is that you could take the extension module code from the ansible plugin [4] and adapt it to a normal Groovy extension module [5] for the StepContext class. This is more work than using the configure block, but results in nicer DSL. [1] https://github.com/jenkinsci/job-dsl-plugin/wiki/Extending-the-DSL |
Ok @mnonnenmacher , thanks for the suggestion. |
I don't know any quick solution, but I am testing now an approach that could fix this issue. I will let you know how it turned out later. |
Thanks 👍 , waiting for it |
Hi @rgaduput, I managed to implement a proof of concept, but it will take some time to make a proper implementation. If everything turns out well, I hope I can make a new release next week. |
Thanks @mnonnenmacher , that's great news. Good luck with :) |
Hi @rgaduput, I have published a snapshot version 3.0.0-SNAPSHOT of the plugin. If you want to give it a try, check the example in the autogenerated-dsl-support branch. It is still work in progress, but mostly works, so you could check if your Job DSL scripts can be processed now. However, I expect that I won't be able to finish the implementation before January. |
Hi @mnonnenmacher , this will be really helpful thanks a lot :) 16:26:51.486 [ERROR] [system.err] 0.054 [id=13] INFO o.jvnet.hudson.test.WarExploder#explode: Exploding /jphome/jp/ccjp/mb_ccjp/.gradle/caches/modules-2/files-2.1/org.jenkins-ci.main/jenkins-war/2.92/131801e769febccd38d5128f587c4ac446ac596/jenkins-war-2.92.war into /jphome/jp/ccjp/mb_ccjp/workspace/Test_DSL_Scripts/build/jenkins-for-test |
Hi @mnonnenmacher , freeStyleJob('Sample_Job'){ Below is the exception, But with the older version of plugin logging is really good. |
Thanks for the feedback @rgaduput, I have tested your script with the current master and made sure that it prints the same error message as the old version. I hope that I can release the new version with generated DSL support next week. |
That's cool @mnonnenmacher , thanks a lot . waiting for new release. |
No, I didn't publish a snapshot, but you can easily build your own by running |
Hi @rgaduput , I have released version 3.0.0, could you give it a try and check if it works for you? The readme and example project have also been updated. |
Thanks a lot @mnonnenmacher , It is working fine now for Auto generated and extension Jenkins plugins, also print exact errors like before :) 👍 . |
Hi,
as we are still using job-dsl-core:1.57 plugin and all our dsl scripts are built according to this version.
While trying to build gradle-jenkins-jobdsl-plugin with this version it is failing with below.
Just changed version to 1.57 of job-dsl-core dependency in plugin/build.gradle file.
Something else also needs to be changed ? (i am bit new programming.)
_Configuration on demand is an incubating feature.
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':plugin:compileGroovy'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:60)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:87)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)_
The text was updated successfully, but these errors were encountered: