summaryrefslogtreecommitdiff
path: root/lib/gitlab/ci/config/entry/job.rb
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-01-14 17:27:13 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-01-15 11:18:14 +0100
commit7b712d359880cb15bad4c0f01308bf12b1518e60 (patch)
treebdeac924e9cb9bcc51daa0a52ed7274465f5148d /lib/gitlab/ci/config/entry/job.rb
parent0cba9bef8a399e8f2003fee23fbda6f525921175 (diff)
downloadgitlab-ce-7b712d359880cb15bad4c0f01308bf12b1518e60.tar.gz
Make default config entry value configurable
Introduce `default:` configuration entry setting that makes it possible to configure a default value of an entry, what overrides class-level `def self.default` value.
Diffstat (limited to 'lib/gitlab/ci/config/entry/job.rb')
-rw-r--r--lib/gitlab/ci/config/entry/job.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gitlab/ci/config/entry/job.rb b/lib/gitlab/ci/config/entry/job.rb
index 326f2df1ea7..1d8904f7b29 100644
--- a/lib/gitlab/ci/config/entry/job.rb
+++ b/lib/gitlab/ci/config/entry/job.rb
@@ -66,7 +66,8 @@ module Gitlab
description: 'Services that will be used to execute this job.'
entry :only, Entry::Policy,
- description: 'Refs policy this job will be executed for.'
+ description: 'Refs policy this job will be executed for.',
+ default: { refs: %w[branches tags] }
entry :except, Entry::Policy,
description: 'Refs policy this job will be executed for.'