'Gitlab monitor specific jobs status
I'm trying to monitor specific jobs on my CI depending on the name of the JOBS
But for now the only things I achieve is getting all failed jobs by adding "jobs?scope=failed" on the url
I tried using the gitlab api with specific url but without success
If anyone got an idea on how to do so :)
Solution 1:[1]
Presuming you already have a pipeline id, you can get all jobs included in the pipeline at
GET /projects/:id/pipelines/:pipeline_id/jobs
At this point you are able to iterate through each of the jobs, and select the one/ones you want to watch, based on the name.
You can store the id/ids of these jobs, and then monitor it/them by polling in intervals.
As long as you have a job's id, you can always get it directly at
GET /projects/:id/pipelines/:pipeline_id/jobs/:job_id
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Jonas V |
