Cancel build in drone.io - timeout

I'm working on setting Drone.io into repositories of my team, in order to have continuous integration.
The problem is I have a test build locked and I see no way to cancel it. Is there a way to cancel it manually? If not, is there a timeout that causes the build expire?
Thank you.

A running Build can be canceled manually any time via Link/Button on status page. There is also an 15 min. fixed Timeout on free plans (see Limits: http://docs.drone.io/buildscript.html).

You can kill a build using drone-cli command, see https://discourse.drone.io/t/how-to-kill-a-build-stuck-in-running-state/1022/2 for details.
Note: You should use the same version for drone-cli and drone-server/agent

You could cancel a drone build using drone build stop:
drone build stop octocat/hello-world 1
Or could forcefully kill the build using drone build kill:
drone build kill octocat/hello-world 1

Related

Travis CI - Running Command on Job Cancellation

My team and I are currently building a project with Travis CI, which initiates a script on remote server. When we click to cancel builds in the Travis UI, the Travis build stops but the script on the remote server continues to run.
Is it possible to automatically run a command after cancelling builds, so that we can tell the remote server to stop executing the script?
Thank you to Travis CI support for this email response:
When a build or job is manually cancelled (or terminated by one of our
workers for a different reason) it is killed without any chance of
cleanup. So no, there is no special after_cancelled hook and
after_failure as well as after_script are not executed when
manually cancelling. This has to do with the way our build lifecycle
is implemented and making an after_cancel possible requires quite
some changes.
We are aware of this issue. It has been raised in our public tracker
https://github.com/travis-ci/travis-ci/issues/4221 and is also being
discussed internally. Unfortunately I cannot give you any time frame
when we will address this issue but we will update the public ticket
once there is progress.

How To Keep Gradle Daemon alive in Jenkins Build

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!

Jenkins BUILD now issue

In the jenkins applications ,I accidentally clicked on the " Build Now " instead of "Build with Parameters" link while trying to Build the application and now its stuck . I am unable to cancel this Build. I tried building the application again however I am unable to promote my new build because the previous Build is still not complete. Is there any way I can abort the previous build ?
in Jenkins Script console (/jenkins/script) try:
Jenkins.getInstance().getItemByFullName(jobName,Job.class).getBuildByNumber(jobNumber).doStop()
Check if you are logged in and you have permissions for aborting the build (should be at job's configuration page)
Jenkins could need some time to process the abortion request.
If you notice that Jenkins is definitely stacked, check the reason.
It could be memory, CPU or space issue.
These Linux commands are highly recommended:
top
df -h
The last and the most unpleasant way is rebooting Jenkins and starting the new job. NEVER try that on production machine :)

pause build and start another build

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.

TFS Release Management has a release stuck In Progress

Our Release Managemeng has a job that is stuck "In Progress".
The error is
Communication with the deployer was lost during the deployment. Please
make sure (1) the deployer machine has not rebooted during
installation and (2) the component timeout is sufficient to copy the
files from the drop location to the deployer machine and install the
package.
I can't stop or abandon the release. The buttons are all disabled. How can I kill this?
From the Release Manager, go to the Release tab. Enter in the details of the actual release, go to the step that is pending and you will see a a "Stop" Button at the top. That will stop the step and change the step of the Release.
Is the build stuck? Can you restart the build controller and / or the build agent? You can look for them by editing the build definition.
Don't trust me as Release Management is pretty new, but the error is about the connection between the RM Server and the RM Deployer service (i.e. the RM agent). RM Server don't know anything more about the agent, so your option is to connect to the target machine(s) and manually check deployment status. If completed, restart the RM Deployer service and cross fingers.
I faced the same issue of the release being stuck in 'In Progress' state. Turned out, the password of the credentials I was using, changed. Once the new password was specified in the deployment agent, the release managed to complete. This was months ago, and now I am facing same issue on other server. No clue what is the reason this time.
We has had this problem in which all releases got stuck on TFS 2018
As there is a connectivity issue with SQL when release is completed , it may not update the status in DB in some cases if load is more, so the release is stuck in InProgress state and started consuming pipeline in SQL . Other releases will also not move ahead, as there is blockage in pipeline. Once we increase the pipeline count, the problematic release could move out as processing of releases started happening.
Once the problematic release is canceled by the system, we set the pipeline back to original count of 1, then you could see their releases progressing and not being stuck.
Solution:
You need to increase the count of pipeline to let say 25 after this create a new Release Pipeline and queue this pipeline this will push all those pipeline which got stuck .Once pipeline start queuing make the count back to one or original count.
Reference - https://blogs.msdn.microsoft.com/tfssetup/2017/11/14/understanding-build-and-release-pipelines-visual-studio-team-servicesteam-foundation-server/

Resources