Skip to content

Commit

Permalink
Merge pull request #244 from scotje/fixup_gitlab_ci_config_merge
Browse files Browse the repository at this point in the history
(MAINT) Ensure .gitlab-ci.yaml configs are merged in the correct order
  • Loading branch information
rodjek authored Apr 22, 2019
2 parents 977eb49 + 3af4981 commit a54df41
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions moduleroot/.gitlab-ci.yml.erb
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
<% if @configs['override'] && @configs.has_key?('custom') -%>
<% configs = @configs['custom'] -%>
<% configs = @configs['custom'].dup -%>
<% elsif @configs['defaults'] && !@configs.has_key?('custom') -%>
<% configs = @configs['defaults'] -%>
<% configs = @configs['defaults'].dup -%>
<% else -%>
<% require 'deep_merge/core' -%>
<% defaults = @configs['defaults'].dup -%>
<% configs = DeepMerge::deep_merge!(defaults, @configs['custom']) -%>
<% configs = {} -%>
<% configs.deep_merge!(@configs['defaults']) -%>
<% configs.deep_merge!(@configs['custom']) -%>
<% end -%>
stages:
<% unless @configs['override'] -%>
Expand Down

0 comments on commit a54df41

Please sign in to comment.