diff options
Diffstat (limited to 'lib/container_registry/tag.rb')
-rw-r--r-- | lib/container_registry/tag.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/container_registry/tag.rb b/lib/container_registry/tag.rb index 76188a937c0..bf44b74cf7b 100644 --- a/lib/container_registry/tag.rb +++ b/lib/container_registry/tag.rb @@ -4,7 +4,7 @@ module ContainerRegistry class Tag include Gitlab::Utils::StrongMemoize - attr_reader :repository, :name + attr_reader :repository, :name, :updated_at attr_writer :created_at delegate :registry, :client, to: :repository @@ -97,6 +97,17 @@ module ContainerRegistry instance_variable_set(ivar(:memoized_created_at), date) end + def updated_at=(string_value) + return unless string_value + + @updated_at = + begin + DateTime.iso8601(string_value) + rescue ArgumentError + nil + end + end + def layers return unless manifest |