Get the environment info for a running job in GET /projects/:id/jobs/:id
Problem to solve
I am creating a tool which will kill the concurrent pipeline running on the same environment. For this i need to create a link between the environment and job/pipeline ID (and kill the one with higher ID).
Best way to see for which environment is the job running (in different pipelines) is to be able to find it using API call GET /projects/:id/jobs/:id
. The information should be visible also if the job is in running state.
Intended users
Unknown
Proposal
Forward the environment information to the /projects/:id/jobs/:id
.
So after running GET /projects/:id/jobs/:id
i would see something like:
{
"id": 123456,
"status": "running",
...
"environment": {
"id": 123,
"name": "example",
"slug": "example-vlpa7h",
"external_url": null
},
...
}