Commit c25c19ea authored by Peter Leitzen's avatar Peter Leitzen

Merge branch 'fix-issue-opening-ci-template-228754' into 'master'

Fix Errno::ENOENT issue in RunDastScanService on production

See merge request gitlab-org/gitlab!36770
parents b7019995 ca7ad14a
......@@ -2,10 +2,12 @@
module Ci
class RunDastScanService < BaseService
DAST_CI_TEMPLATE = 'lib/gitlab/ci/templates/Security/DAST.gitlab-ci.yml'.freeze
def self.ci_template_raw
@ci_template_raw ||= Gitlab::Template::GitlabCiYmlTemplate.find('DAST').content
end
def self.ci_template
@ci_template ||= File.open(DAST_CI_TEMPLATE, 'r') { |f| YAML.safe_load(f.read) }.tap do |template|
@ci_template ||= YAML.safe_load(ci_template_raw).tap do |template|
template['stages'] = ['dast']
template['dast'].delete('rules')
end
......
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