I would love to have a listing of the latest jobs or the latest pipeline/jobs for the API endpoints. At the moment I have to fetch the latest pipeline id and then fetch related jobs.
@markglenfletcher A lastest or whatever parameter for /jobs is going to work for me. After rethinking, this is even better than the additional sub-route as it provides support for outdated APIs too - they would just show all jobs instead of the latest so nothing is going to break.
@redaxmedia could you please give us more information about the use case where you need this? Normally the primary entity is the pipeline, so we want to access jobs in the latest pipeline. I'm not sure to understand what we can get with the latest job for a project, since it could represent anything.
Basicly this feature request is about fetching the current build status of a project. There are many usecase such as creating some kind of software that will notify a programer about a broken, pending or passed build.
The software I developed is running in the background and changes the color of keyboards or mouses according to the build status of one or multiple projects. https://github.com/redaxmedia/chroma-feedback
When I run Chroma Feedback against your /jobs endpoint I will get something like this:
✔ Build of redaxmedia/5583334/build_master on gitlab passed✔ Build of redaxmedia/5583334/rspec on gitlab passed✔ Build of redaxmedia/5583334/rubocop on gitlab passed✔ Build of redaxmedia/5583334/eslint on gitlab passed✔ Build of redaxmedia/5583334/lint on gitlab passed✔ Build of redaxmedia/5583334/crop_pictures on gitlab passed✔ Build of redaxmedia/5583334/build_master on gitlab passed✔ Build of redaxmedia/5583334/rspec on gitlab passed✔ Build of redaxmedia/5583334/rubocop on gitlab passed✖ Build of redaxmedia/5583334/eslint on gitlab failed✔ Build of redaxmedia/5583334/crop_pictures on gitlab passed... and more
This results the software to think, hey the project is broken as one of the older jobs failed.
What I need are the last jobs of the very last pipeline that reflect the current build status:
✔ Build of redaxmedia/5583334/crop_pictures on gitlab passed✔ Build of redaxmedia/5583334/lint on gitlab passed✔ Build of redaxmedia/5583334/eslint on gitlab passed✔ Build of redaxmedia/5583334/rubocop on gitlab passed✔ Build of redaxmedia/5583334/rspec on gitlab passed✔ Build of redaxmedia/5583334/build_master on gitlab passed
This item has been automatically determined to have 4 or fewer upvotes and is, for now, being marked as awaiting further demand. If you feel this is incorrect, please comment on the issue and I'll be happy to take a look.
Internal customer would appreciate this feature as well ;-) GitLab Support often needs to review the latest job log for this internal project. The /pipeline?page=1&scope=finished page can easily be filtered by ref and/or triggering usernameref=katrinleinweber`, but it then requires 2 clicks to load the actually relevant job log. #293862 (closed) would alternatively help as well.