Class: UffizziCore::ContainerRegistry::DockerRegistryService

Inherits:
Object
  • Object
show all
Defined in:
app/services/uffizzi_core/container_registry/docker_registry_service.rb

Class Method Summary collapse

Class Method Details

.credential_correct?(credential) ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
# File 'app/services/uffizzi_core/container_registry/docker_registry_service.rb', line 13

def credential_correct?(credential)
  client(credential).authenticated?
end

.digestObject



17
# File 'app/services/uffizzi_core/container_registry/docker_registry_service.rb', line 17

def digest(*); end

.image_available?(credential, image_data) ⇒ Boolean

Returns:

  • (Boolean)


5
6
7
8
9
10
11
# File 'app/services/uffizzi_core/container_registry/docker_registry_service.rb', line 5

def image_available?(credential, image_data)
  client_params = build_client_params(credential, image_data)
  client = UffizziCore::DockerRegistryClient.new(**client_params)
  client.manifests(namespace: image_data[:namespace], image: image_data[:name], tag: image_data[:tag])

  true
end