cloudbees/jenkins-scripts

how to pause/resume build?

denglitong opened this issue · 2 comments

i use pipeline, and i can see left-sdie button Pause/Resume which trigger api /job/${job_name}/${build_num}/pause/toggle to do pause/resume action, my question is, how can i distinguish the status the build is pausing or is resuming(that is running without pause). i do much search but found nothing about it, i even goto https://javadoc.jenkins.io/hudson/model/Run.html to read the method releated, but i cannot found the answer yet, here i beleive the api above must can known whether status of build right now whether is pausing or not, here i want to get the status, any response is appreciated, thanks a lot!

go to console output you will see if it is paused or not

go to console output you will see if it is paused or not

sorry about my ambiguous description, my question is how can i use the Jenkins api, to get the status of a build in process (whether is running or pausing). thanks for your time :-)