Skip to content

Adds kind field to JobType

Laura Montemayor requested to merge add-job-type-class into master

What does this MR do and why?

Adds the kind field to JobType. This is to help frontend use the following query to differentiate between a Ci::Build and a Ci::Bridge

Testing

To test this, go to http://localhost:3000/-/graphql-explorer and input the following query:

{
  project(fullPath: "root/chess-of-the-wind") {
    pipeline(iid: "17") {
      jobs {
        nodes {
          kind
        }
      }
    }
  }
}

This is the response you get:

{
  "data": {
    "project": {
      "pipeline": {
        "jobs": {
          "nodes": [
            {
              "kind": "BRIDGE"
            },
            {
              "kind": "BRIDGE"
            },
            {
              "kind": "BUILD"
            },
            {
              "kind": "BUILD"
            }
          ]
        }
      }
    }
  }
}

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

#356071 (closed)

Edited by Laura Montemayor

Merge request reports