Skip to content

GraphQL PMG - job action mutations

Briley Sandlin requested to merge bs-pmg-gql-action-mutations into master

What does this MR do and why?

Part 2 of 3 for #467279 (closed)

  • Part 1 - Render job action buttons
  • Part 2 - Job action mutations < you are here
  • Part 3 - Confirmation modal

This MR wires in the job action mutations. When you click an action button, the necessary mutation will fire and the job status will update.

job_action_buttons

How to set up and validate locally

Prerequisites

  • An enabled feature flag: Feature.enable(:ci_graphql_pipeline_mini_graph)
  • A working runner

Steps

  1. Navigate to a project (this example uses the flightjs group)
  2. Navigate to the Pipeline Editor (Build > Pipeline editor)
  3. Trigger a pipeline
  4. Once the pipeline appears in the pipeline editor widget, click on a stage
  5. You should see the dropdown with a list of jobs and action buttons
  6. Click an action button to test out the mutations.

Example gitlab-ci.yml if you'd like to see different job types

job: 
  script:
    - sleep 5
  when: delayed
  start_in: 2 minutes

another_job:
  script:
    - sleep 5
  when: manual

another_job_2:
  script:
    - sleep 15
  when: on_failure

Merge request reports

Loading