Respect the GITLAB_ELASTICSEARCH_INDEXER_VERSION file

parent 7b7fd3bf
......@@ -4,6 +4,7 @@ module ReleaseTools
class ComponentVersions
FILES = %w[
GITALY_SERVER_VERSION
GITLAB_ELASTICSEARCH_INDEXER_VERSION
GITLAB_PAGES_VERSION
GITLAB_SHELL_VERSION
GITLAB_WORKHORSE_VERSION
......
......@@ -3,6 +3,8 @@
module ReleaseTools
module Release
class CNGImageRelease < BaseRelease
INDEXER_VERSION = 'GITLAB_ELASTICSEARCH_INDEXER_VERSION'
class VersionFileDoesNotExistError < StandardError; end
def remotes
Project::CNGImage.remotes
......@@ -19,6 +21,7 @@ module ReleaseTools
'GITALY_VERSION' => version_string_from_file('GITALY_SERVER_VERSION'),
'GITLAB_SHELL_VERSION' => version_string_from_file('GITLAB_SHELL_VERSION'),
'GITLAB_WORKHORSE_VERSION' => version_string_from_file('GITLAB_WORKHORSE_VERSION'),
INDEXER_VERSION => version_string_from_file(INDEXER_VERSION),
'GITLAB_REF_SLUG' => version_string(version),
'GITLAB_ASSETS_TAG' => version_string(version)
)
......
......@@ -53,6 +53,7 @@ module ReleaseTools
files = %w[GITLAB_SHELL_VERSION GITLAB_WORKHORSE_VERSION]
files << 'GITLAB_PAGES_VERSION' if expect_pages_version_file?
files << 'GITALY_SERVER_VERSION' if expect_gitaly_version_file?
files << 'GITLAB_ELASTICSEARCH_INDEXER_VERSION' if expect_indexer_version_file?
files << 'VERSION' # Always update VERSION last
files
end
......@@ -70,6 +71,11 @@ module ReleaseTools
version.major >= 9
end
# Prior to v12.0, omnibus was canonical for the indexer version
def expect_indexer_version_file?
version.major >= 12
end
def version_from_gitlab_repo(file_name)
file_path = File.join(repository.path, file_name)
unless File.exist?(file_path)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment