Skip to content
代码片段 群组 项目
提交 04ce971d 编辑于 作者: Gabriel Mazetto's avatar Gabriel Mazetto
浏览文件

Extract GitLab Environment data from tasks into SourceContext

上级 1f41ed19
No related branches found
No related tags found
1 合并请求!2419Fix TanukiBot spec relying on outdated code
显示
63 个添加34 个删除
......@@ -17,6 +17,60 @@ def backup_basedir
# TODO: decouple from Rails codebase, load from gitlab.yml file
Rails.root.join('tmp/backups')
end
# CI Builds basepath
def ci_builds_path
# TODO: Use configuration solver
Settings.gitlab_ci.builds_path
end
# Job Artifacts basepath
def ci_job_artifacts_path
# TODO: Use configuration solver
JobArtifactUploader.root
end
# CI Secure Files basepath
def ci_secure_files_path
# TODO: Use configuration solver
Settings.ci_secure_files.storage_path
end
# CI LFS basepath
def ci_lfs_path
# TODO: Use configuration solver
Settings.lfs.storage_path
end
# Packages basepath
def packages_path
# TODO: Use configuration solver
Settings.packages.storage_path
end
# GitLab Pages basepath
def pages_path
# TODO: Use configuration solver
Gitlab.config.pages.path
end
# Registry basepath
def registry_path
# TODO: Use configuration solver
Settings.registry.path
end
# Terraform State basepath
def terraform_state_path
# TODO: Use configuration solver
Settings.terraform_state.storage_path
end
# Upload basepath
def upload_path
# TODO: Use configuration solver
File.join(Gitlab.config.uploads.storage_path, 'uploads')
end
end
end
end
......
......@@ -17,10 +17,7 @@ def target
::Backup::Targets::Files.new(nil, storage_path, options: options, excludes: ['tmp'])
end
def storage_path
# TODO: Use configuration solver
JobArtifactUploader.root
end
def storage_path = context.ci_job_artifacts_path
end
end
end
......
......@@ -17,10 +17,7 @@ def target
::Backup::Targets::Files.new(nil, storage_path, options: options)
end
def storage_path
# TODO: Use configuration solver
Settings.gitlab_ci.builds_path
end
def storage_path = context.ci_builds_path
end
end
end
......
......@@ -17,10 +17,7 @@ def target
::Backup::Targets::Files.new(nil, storage_path, options: options, excludes: ['tmp'])
end
def storage_path
# TODO: Use configuration solver
Settings.ci_secure_files.storage_path
end
def storage_path = context.ci_secure_files_path
end
end
end
......
......@@ -17,10 +17,7 @@ def target
::Backup::Targets::Files.new(nil, storage_path, options: options)
end
def storage_path
# TODO: Use configuration solver
Settings.lfs.storage_path
end
def storage_path = context.ci_lfs_path
end
end
end
......
......@@ -17,10 +17,7 @@ def target
::Backup::Targets::Files.new(nil, storage_path, options: options, excludes: ['tmp'])
end
def storage_path
# TODO: Use configuration solver
Settings.packages.storage_path
end
def storage_path = context.packages_path
end
end
end
......
......@@ -21,10 +21,7 @@ def target
::Backup::Targets::Files.new(nil, storage_path, options: options, excludes: [LEGACY_PAGES_TMP_PATH])
end
def storage_path
# TODO: Use configuration solver
Gitlab.config.pages.path
end
def storage_path = context.pages_path
end
end
end
......
......@@ -19,10 +19,7 @@ def target
::Backup::Targets::Files.new(nil, storage_path, options: options)
end
def storage_path
# TODO: Use configuration solver
Settings.registry.path
end
def storage_path = context.registry_path
end
end
end
......
......@@ -17,9 +17,7 @@ def target
::Backup::Targets::Files.new(nil, storage_path, options: options, excludes: ['tmp'])
end
def storage_path
Settings.terraform_state.storage_path
end
def storage_path = context.terraform_state_path
end
end
end
......
......@@ -17,9 +17,7 @@ def target
::Backup::Targets::Files.new(nil, storage_path, options: options, excludes: ['tmp'])
end
def storage_path
File.join(Gitlab.config.uploads.storage_path, 'uploads')
end
def storage_path = context.upload_path
end
end
end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册