Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/ci/jobs.rb')
-rw-r--r--lib/api/ci/jobs.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/api/ci/jobs.rb b/lib/api/ci/jobs.rb
index cd5f1f77ced..6049993bf6f 100644
--- a/lib/api/ci/jobs.rb
+++ b/lib/api/ci/jobs.rb
@@ -142,7 +142,8 @@ module API
reject_if_build_artifacts_size_refreshing!(build.project)
- build.erase(erased_by: current_user)
+ ::Ci::BuildEraseService.new(build, current_user).execute
+
present build, with: Entities::Ci::Job
end
@@ -209,8 +210,8 @@ module API
.select { |_role, role_access_level| role_access_level <= user_access_level }
.map(&:first)
- environment = if environment_slug = current_authenticated_job.persisted_environment&.slug
- { slug: environment_slug }
+ environment = if persisted_environment = current_authenticated_job.persisted_environment
+ { tier: persisted_environment.tier, slug: persisted_environment.slug }
end
# See https://gitlab.com/gitlab-org/cluster-integration/gitlab-agent/-/blob/master/doc/kubernetes_ci_access.md#apiv4joballowed_agents-api