mirror of
https://github.com/czhu12/canine.git
synced 2025-12-30 07:39:43 -06:00
16 lines
350 B
Ruby
16 lines
350 B
Ruby
class Portainer::SyncRegistries
|
|
extend LightService::Action
|
|
|
|
expects :stack_manager, :user, :clusters
|
|
|
|
executed do |context|
|
|
clusters = context.stack_manager.account.clusters
|
|
if clusters.any?
|
|
context.stack_manager.stack.connect(context.user).sync_registries(
|
|
context.user,
|
|
clusters.first
|
|
)
|
|
end
|
|
end
|
|
end
|