I am running some curl commands to start a job in Jenkins like the following:
curl -I -u TestUser:11111111222222233axcdesdfdc http://<aipaddress>:<port>/job/My%20Test%20Job/build?token=myToken
I can abort the job using the following command via some reading
curl -X POST JENKINS_URL/job/JOB_NAME/BUILD_ID/stop --user USER:TOKEN
so i will have
curl -X POST http://<aipaddress>:<port>/job/My%20Test%20Job/BUILD_ID/stop --user
TestUser:11111111222222233axcdesdfdc
but what is the BUILD_ID of he currently running job ?
If there are 2 or more jobs running I want the buildnumber of the job that I triggered with the curl build ?
I run these commands from remote machines.
question from:
https://stackoverflow.com/questions/65931502/how-can-i-get-the-build-number-of-a-job-in-jenkins-that-i-want-to-stop 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…