10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/generators/modulorails/gitlabci/gitlabci_generator.rb', line 10
def create_config_file
@data = Modulorails.data
@image_name = @data.name.parameterize
@environment_name = @data.environment_name
@adapter = data.adapter
@review_base_url = @data.review_base_url
@staging_url = @data.staging_url
@production_url = @data.production_url
template '.gitlab-ci.yml'
template 'config/deploy/production.yaml' if @production_url.present?
template 'config/deploy/staging.yaml' if @staging_url.present?
template 'config/deploy/review.yaml' if @review_base_url.present?
remove_file 'config/database-ci.yml'
create_keep_file
rescue StandardError => e
warn("[Modulorails] Error: cannot generate CI configuration: #{e.message}")
end
|