summaryrefslogtreecommitdiff
path: root/app/graphql/mutations/ci/job
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/mutations/ci/job')
-rw-r--r--app/graphql/mutations/ci/job/retry.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/app/graphql/mutations/ci/job/retry.rb b/app/graphql/mutations/ci/job/retry.rb
index 50e9c51c9e7..bfb9b902cc5 100644
--- a/app/graphql/mutations/ci/job/retry.rb
+++ b/app/graphql/mutations/ci/job/retry.rb
@@ -11,13 +11,20 @@ module Mutations
null: true,
description: 'Job after the mutation.'
+ argument :variables, [::Types::Ci::VariableInputType],
+ required: false,
+ default_value: [],
+ replace_null_with_default: true,
+ description: 'Variables to use when retrying a manual job.'
+
authorize :update_build
- def resolve(id:)
+ def resolve(id:, variables:)
job = authorized_find!(id: id)
project = job.project
+ variables = variables.map(&:to_h)
- response = ::Ci::RetryJobService.new(project, current_user).execute(job)
+ response = ::Ci::RetryJobService.new(project, current_user).execute(job, variables: variables)
if response.success?
{