This section provides the instruction on how to abort the hung Jenkins build if it does not restore after the Jenkins dedicated node is restared, for example.
To abort a hung build, select from the following options
Abort the job build from the Jenkins web UI:
Log in to the Jenkins web UI as an Administrator using the FQDN of your
cloud endpoint and the 8081
port. For example,
https://cloud.example.com:8081
.
Navigate to Manage Jenkins > Script Console.
Run the following script setting the job name and number of the hung build accordingly:
def build = Jenkins.instance.getItemByFullName("jobName").getBuildByNumber(jobNumber)
build.doStop()
build.doKill()
Abort the job build from a cid
node (if the previous option did not
help):
Log in to any cid
node.
Run:
cd /srv/volumes/jenkins/jobs/<job-name>/builds/
rm -rf <hung-build-number>
Log in to the Jenkins web UI as an Administrator using the FQDN of your
cloud endpoint and the 8081
port. For example,
https://cloud.example.com:8081
.
Navigate to Manage Jenkins > Reload Configuration from Disk, click to reload. Or restart the Jenkins instance.