-
Notifications
You must be signed in to change notification settings - Fork 1
Spotbugs sequential execution as gradle task #119
Comments
Hi. In case of Jenkins, I would recommend using Locable Resources Plugin (https://www.jenkins.io/doc/pipeline/steps/lockable-resources/). |
@lasselindqvist Thanks for your quick answer bro. But I think that the problem is not related to Jenkins, because I just want to make spotbugs task sequential, in other words if at some point in time spotbugs is running for some java module, I want gradle to finish that task before start next spotbugs task for another module. If I have 8 modules and Jenkins runs 8 parallel gradle tasks, for example: Compile gradle tasks will finish faster than spotbugs one, and if gradle start another spotbugs task for some modules, for example: At that moment the job will need more than 6GB of RAM and I don't have that much. I just need to tell gradle: "Hey, don't run spotbugs, because another module is now using that gradle task" Best regards, Mario :) |
If you just want one spotbugs at a time, the situation is even simpler for you. Just use
and it will only allow one single command globally. |
@lasselindqvist Thank you man, appreciate your help. Can this plugin be used in Jenkins freestyle job instead of pipeline? |
I would think you can. Best way to find out is to just install the plugin and try using it. |
Hi guys, I have a question about spotbugs functionalities.
I want to mentioned that the project is Java multi module based.
I have one Jenkins job that runs some parallel gradle tasks(up to 8) on different java project modules and static code analysis including spotbugs.
The problem is that spotbugs requires a lot of memory(up to 1GB) and when I start more than one spotbugs gradle task at the same time, the Jenkins job node freezes and I have to restart the machine because some resources remain locked.
I cannot decrease spotbugs memory, because some modules are big.
So my question is: Does anyone know how to make only the spotbugs task to run sequential and let the rest of the gradle tasks run in parallel?
Maybe I have to put somewhere some boolean flag to indicate that i don't want to execute that task in parallel?
If you need any further information please don't hesitate to ask :)
The text was updated successfully, but these errors were encountered: