Comments (5)
Hi. In case of Jenkins, I would recommend using Locable Resources Plugin (https://www.jenkins.io/doc/pipeline/steps/lockable-resources/).
https://stackoverflow.com/questions/56786164/jenkins-resource-locks-get-lock-for-multiple-node-specific-resources/58393432#58393432 also very well shows how you can make the locks node-specific so that it would allow different nodes to run different static analysis builds.
from discuss.
@lasselindqvist Thanks for your quick answer bro.
So if I understand right, this plugin allows you to lock specific amount of RAM memory for some Jenkins job build step.
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:
Module1.compile(requires a little bit of memory and needs some seconds to finish)
Module2.compile(requires a little bit of memory and needs some seconds to finish)
Module3.compile(requires a little bit of memory and needs some seconds to finish)
Module4.compile(requires a little bit of memory and needs some seconds to finish)
Module5.compile(requires a little bit of memory and needs some seconds to finish)
Module6.compile(requires a little bit of memory and needs some seconds to finish)
Module7.compile(requires a little bit of memory and needs some seconds to finish)
Module8.spotbugs(requires 1GB RAM and needs some extra minutes to finish)
Compile gradle tasks will finish faster than spotbugs one, and if gradle start another spotbugs task for some modules, for example:
Module1.spotbugs
Module2.test
Module3.spotbugs
Module4.spotbugs
Module5.spotbugs
Module6.spotbugs
Module7.test
Module8.spotbugs
At that moment the job will need more than 6GB of RAM and I don't have that much.
I don't know if you understand me right :)
I just need to tell gradle: "Hey, don't run spotbugs, because another module is now using that gradle task"
Best regards, Mario :)
from discuss.
If you just want one spotbugs at a time, the situation is even simpler for you. Just use
lock(label: 'spotbugs') {
// gradle spotbugs command goes here
}
and it will only allow one single command globally.
from discuss.
@lasselindqvist Thank you man, appreciate your help. Can this plugin be used in Jenkins freestyle job instead of pipeline?
from discuss.
I would think you can. Best way to find out is to just install the plugin and try using it.
from discuss.
Related Issues (20)
- maven plugin documentation not found on github.io HOT 1
- Is there an API to obtain the messages in the messages.xml file? HOT 4
- Task :spotbugs:spotlessJavaCheck FAILED HOT 1
- 📢 We're migrating this repo to GitHub Discussion in each repo
- Ranks of abstract interpretation rules (for TIOBE quality indicator) needed.
- Detector for SEI Cert ERR08-J
- How can I analyze groovy source files? HOT 1
- New SEI-Cert Detectors
- BugPattern categories and plugin testing HOT 2
- limit build failure at parent level HOT 1
- EI_EXPOSE_REP and EI_EXPOSE_REP2 failures when using Immutable objects from Guava. How should this be corrected? HOT 3
- .
- Clarification requested regarding DMI: Random object created and used only once HOT 1
- Question about license HOT 5
- When does idea spotbugs plugin support spotbugs version 4.6.0? HOT 2
- Is it possible to use -auxclasspath to ignore jars inside war files?
- Is there a way to get rid of JSR305 with SpotBugs annotations? HOT 1
- Privacy and Data Protection policy Plug-in HOT 4
- How can I use your code? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from discuss.