in lib/gitlab/qa/support/gitlab_upgrade_path.rb [146:172]
def find_latest_internal_tag(gitlab_int_reg_repo, docker)
latest_internal_tag = nil
logger.info("Start searching for the latest released internal image for gitlab version: #{current_version}...")
10.downto(0) do |internal_num|
tag = "#{current_version}-internal#{internal_num}-0"
image_uri = "#{gitlab_int_reg_repo}:#{tag}"
logger.info("Checking for image: #{image_uri}")
begin
docker.pull(image: gitlab_int_reg_repo, tag: tag)
latest_internal_tag = tag
logger.info("Found image: #{image_uri}")
break
rescue Support::ShellCommand::StatusError => e
logger.info("x - Image not found: #{image_uri}, \n #{e}")
end
end
latest_internal_tag
end