debian-mirror-gitlab/app/services/clusters/applications/create_service.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
550 B
Ruby
Raw Normal View History

2018-12-13 13:39:08 +05:30
# frozen_string_literal: true
module Clusters
module Applications
2019-07-07 11:18:12 +05:30
class CreateService < Clusters::Applications::BaseService
2018-12-13 13:39:08 +05:30
private
2019-07-07 11:18:12 +05:30
def worker_class(application)
application.updateable? ? ClusterUpgradeAppWorker : ClusterInstallAppWorker
2018-12-13 13:39:08 +05:30
end
def builder
2019-12-04 20:38:33 +05:30
cluster.public_send(application_class.association_name) || # rubocop:disable GitlabSecurity/PublicSend
2019-07-31 22:56:46 +05:30
cluster.public_send(:"build_application_#{application_name}") # rubocop:disable GitlabSecurity/PublicSend
2018-12-13 13:39:08 +05:30
end
end
end
end