Everytime Jenkins finished the build, it will kill every process it produced. But with Android project, I want the Gradle Daemon to keep alive in the background to get fast build time in the next build, is there any solution to this?
Thank you for any help!
Related
I am running Jenkins using maven and once the job is completed it is not terminating until we terminate it manually.In console output able to see the results but not showing build success and showing the processing symbol/loading symbol. can any one tell me how to stop the job after job execution.
Do we need to terminate manually or
do we have need to add anything in post build to stop after successful execution?
do we have to set something in configuration to terminate automatically
please can anyone help me out?
A few things could be going on here:
Does the Maven build execute any other goals after running tests ? If so those could be hanging.
Does your build run on a slave ? If so, Jenkins copies log files and other artifacts back to the master after completing the build steps but before marking the build as complete. You may have a network or I/O bottleneck here.
If you can't figure out the root cause and just want to have the build terminate without intervention, you can use the build timeout plugin.
If you have jobs running in parallell then some plugins have to wait for the older jobs to finish until the current one can. Not sure if this is your situation.
After using webdriver.quit() in our selenium project, it's working fine.Job got completed and the reports were generated.
In some occasions a runtime error causes a Jenkins Workflow build to crash, but Jenkins still sees this as a running build. Aborting the job is not possible in de Jenkins Gui. How can I abort or delete such a build?
I restart jenkins. I'm not happy with it though.
You can disconnect a slave node even when it's running a build. Once you reconnect the slave, there should be no jobs running on it.
See JENKINS-25550 for the current workaround for this class of bug.
I am trying to run some automated acceptance tests on a windows VM but am running into some problems.
Here is what I want, a job which runs on a freshly reverted VM all the time. This job will get an MSI installer from an upstream job, install it, and then run some automated tests on it, in this case using robotframework (but that doesn't really matter in this case)
I have setup the slave in the vSphere plugin to only have one executor and to disconnect after one execution. On disconnect is shutsdown and reverts. My hope was this meant that it would run one Jenkins job and then revert, the next job would get a fresh snapshot, and so would the next and so on.
The problem is if a job is in queue waiting for the VM slave, as soon as the first job finishes the next one starts, before the VM has shutdown and reverted. The signal to shutdown and revert has however been sent, so the next job is almost immedieatly failed as the VM shuts down.
Everything works fine as long as jobs needing the VM aren't queued while another is running, but if they are I run into this problem.
Can anyone suggest a way to fix this?
Am I better off using vSphere build steps rather than setting up a build slave in this fashion, if so how exactly do I go about getting the same workflow to work using buildsteps and (i assume) pipelined builds.
Thanks
You can set a 'Quiet period' - it's in Advanced Project Options when you create a build. You should set it at the parent job, and this is the time to wait before executing the dependent job
If you'll increase the wait time, the server will go down before the second job starts...
Turns out the version of the vSphere plugin I was using was outdated, this bug problem is fixed in the newer version
I am trying to implement continuous integration using Jenkins and i came across below scenario.
I have a build, say Build A which is configured to run every 1 hour. This job require another process ( independant background java process ). But what happens is sometimes this background job will not respond or we have to restart the job in order to complete the Build A without any exceptions. If the process is down, we will get console exceptions and build will fail.
I have found a solution for this.
Abort the current Build A and start Build B.
Trigger Build A after build B is success.
But
What i am looking for is, if there is a console exception, pause this build and trigger Build B which will restart the process and I should be able to resume Build A when the build B is success.
There is no easy way known to do that in Jenkins. It would be much easier to start (and possibly restart) the fixture process from the build itself. Perhaps even integrate it into your build/test tool so the CI job can be easily replicated or reproduced locally.
Our Jenkins performs massive integration tests. The longer the jenkins is running, the longer the tests need. Thus we restart the Jenkins server every night via cronjob. Meanwhile the build queue is too long to be finished and the currently running job is canceled and a fail. That's ugly. I found the Safe Restart Plugin, but that waits for empty build queues. Ideally I would have a job which could be priorized to also reboot at every wanted time during the day. This job needs to perform the reboot as the safe restart plugin would do if no jobs where left.