Skip to content
代码片段 群组 项目
提交 4d888aa9 编辑于 作者: Dan Davison's avatar Dan Davison
浏览文件

Merge branch 'acunskis-package-and-qa-allure' into 'master'

Set custom allure environment for package-and-qa runs

See merge request gitlab-org/gitlab!63191
No related branches found
No related tags found
无相关合并请求
......@@ -23,9 +23,17 @@ def configure!
#
# @return [void]
def configure_allure
# Match job names like ee:relative, ce:update etc. and set as execution environment
env_matcher = /^(?<env>\w{2}:\S+)/
AllureRspec.configure do |config|
config.results_directory = 'tmp/allure-results'
config.clean_results_directory = true
# Set custom environment name to separate same specs executed on different environments
if Env.running_in_ci? && Env.ci_job_name.match?(env_matcher)
config.environment = Env.ci_job_name.match(env_matcher).named_captures['env']
end
end
end
......@@ -67,7 +75,7 @@ def configure_rspec
issue = example.metadata.dig(:quarantine, :issue)
example.issue('Issue', issue) if issue
example.add_link(name: "Job(#{ENV['CI_JOB_NAME']})", url: ENV['CI_JOB_URL']) if ENV['CI']
example.add_link(name: "Job(#{Env.ci_job_name})", url: Env.ci_job_url) if Env.running_in_ci?
end
end
end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册