Adds scheduling_type to Job and UsesNeeds to Pipeline
What does this MR do?
Adds the scheduling_type
field to CiJob
that determines whether a Job has the needs:
keyword or not. If it does, it will return dag
, if it doesn't it will return stage
.
Also adds the usesNeeds
boolean to PipelineType
, which returns true
if any job on that pipeline has scheduling_type == 'dag'
Screenshots (strongly suggested)
Query:
{
project(fullPath: "root/wake-in-fright") {
pipeline(iid: 4) {
usesNeeds
jobs {
nodes {
name
schedulingType
}
}
}
}
}
Response:
{
"data": {
"project": {
"pipeline": {
"usesNeeds": true,
"jobs": {
"nodes": [
{
"name": "test_2",
"schedulingType": "dag"
},
{
"name": "test_1",
"schedulingType": "dag"
},
{
"name": "pre-test_3",
"schedulingType": "stage"
},
{
"name": "pre-test_2",
"schedulingType": "stage"
},
{
"name": "pre-test_1",
"schedulingType": "stage"
},
{
"name": "build_2",
"schedulingType": "stage"
},
.... and so forth
Does this MR meet the acceptance criteria?
Conformity
-
📋 Does this MR need a changelog?-
I have included a changelog entry. -
I have not included a changelog entry because _____.
-
-
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides
Edited by Laura Montemayor