Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stop build execution in Jenkins

Tags:

jenkins

I am using Jenkins to run a Maven project having Junit tests in Sauce Connect. I created a job and to stop/abort the build in between I clicked the Cross button (X) shown near progress bar for build execution. But the build execution does not get stopped. When I moved to console output for the build, it was showing message as "Closing Sauce Connect" and it takesd too much time and Jenkins does not stop build process.

Could anyone please advice as to how can we manually stop/abort build execution.

Additionally, is there any site where we can find proper documentation regarding Jenkins for Beginners as i have few more problems regarding its start and stop process.

like image 941
user968813 Avatar asked May 21 '12 14:05

user968813


People also ask

How do I stop Jenkins job from being executed?

Abort the job by clicking the red X next to the build progress bar. Click on "Pause/resume" on the build to pause. Click on "Pause/resume" again to resume the build.

How do you stop a stage in Jenkins pipeline?

Alternatively you can call error(String message) step to stop the pipeline and set its status to FAILED . For example, if your stage 1 calls error(msg) step like: stage("Stage 1") { steps { script { error "This pipeline stops here!" } } }

How do I pause Jenkins job?

You need to click on the build number to see the sidebar menu with pause / resume.


1 Answers

I guess it is too late to answer but my help some people.

  1. Install the monitoring plugin. (http://wiki.jenkins-ci.org/display/JENKINS/Monitoring)
  2. Go to jenkinsUrl/monitoring/nodes
  3. Go to the Threads section at the bottom

  4. Click on the details buttom on the left of the slave the job is build on

  5. Sort by User time (ms)
  6. Then look at the name of the thread, you will have the name and number of the build
  7. Kill it

Hope it can help

like image 93
Simon Avatar answered Sep 20 '22 10:09

Simon