I am trying to automate CI/CD of Classic Template.
Created and Staged template on GCS following the documentation
On code changes (Bug fixes etc), I intend to drain the existing job and create a new job with the same name.
To drain existing job, I need JOB_ID, but I have only JOB_NAME which I used during the creation of the job.
The only way i see is to use list command and fetch the active jobs, process the output to extract the job id to use it in the drain command. It seems to be quite a roundabout way. Isn't there a way to Drain a job with Job_Name or at least get JOB_ID from JOB_NAME.